Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

@ceiling @floor @int not working version 21.01.63

Mar
39
1
I, of course, had to immediately go to build 63 of TC21. Because this is the latest version, I cannot see the fix list for the various builds. I did notice the following problem with the above mentioned numeric functions: @int appears to do nothing and all three r seem to ignore a comma separator.


C:\bin>echo %@ceiling[12.34] %@floor[12.34] %@int[12.34]
1234 1234 12.34

C:\bin>echo %@ceiling[12,34] %@floor[12,34] %@int[12,34]
1234 1234 1234
 
Here, @CEILING @FLOOR and @INT all work as expected at startup. But SETDOS /G causes some weird behavior, even if I SETDOS /G., -- the default.
 
Here, @CEILING @FLOOR and @INT all work as expected at startup. But SETDOS /G causes some weird behavior, even if I SETDOS /G., -- the default.
I never used setdos /g and I know that @int changed with the update to build 63. The batch file I used it in worked differently after the update. I didn't notice right away as the data was sent to a log file.
 
My defaults are the usual U.S. ones. As Charles pointed out, using SETDOS /G, even with the default values messes with those functions.

Code:
v:\> echo %@ceiling[12.34] %@floor[12.34] %@int[12.34]
13 12 12

v:\> setdos /g.,

v:\> echo %@ceiling[12.34] %@floor[12.34] %@int[12.34]
1234 1234 12.34
 
SETDOS /G has been obsolete for 20+ years. I cannot think of any case where it would be useful - why do you want to use it?

SETDOS /G is easy. But that's not the point. If, in the OPTION diaglog, I check '.' for decimalchar and "," for thousandschar, those functions mess up. Here's a newly started TCCv22.
Code:
v:\> option decimalchar
decimalchar=.

v:\> option thousandschar
thousandschar=,

v:\> echo %@ceiling[12.34] %@floor[12.34] %@int[12.34]
1234 1234 12.34

And they don't mess up in v20 (hardly 20 years ago);
Code:
v:\> ver

TCC  20.11.46   Windows 7 [Version 6.1.7601]

v:\> echo %@ceiling[12.34] %@floor[12.34] %@int[12.34]
13 12 12

v:\> setdos /g.,

v:\> echo %@ceiling[12.34] %@floor[12.34] %@int[12.34]
13 12 12
 
I have never used setdos /g. The @int was applied to the result of an @eval anyway so the arithmetic symbols should have been consistant. The @int works fine on ver 19 20 just fine and had been working for ver 21 until that last update. The problem seems there. Sorry you cannot duplicate it, it only happened with 21.63. I know it works for everyother release.
 
I have never used setdos /g.
I don't think anybody is suggesting that. We're just tossing out an idea for reproducing the issue. FWIW, I agree with you that something screwing is going on with those functions in that build.
 
I've been testing v22.00.41. Setting those to '.' and ',' in the OPTION dialog screws up those functions.
 
Back
Top