Talk:Comet32
From CometWiki
Line 30: | Line 30: | ||
<li> Fair enough, I can work around my problem fairly easily. | <li> Fair enough, I can work around my problem fairly easily. | ||
<li> I agree that we should take this chance to get rid of old & irrelevant stuff. | <li> I agree that we should take this chance to get rid of old & irrelevant stuff. | ||
+ | <P> | ||
+ | This numeric overflow thing. | ||
+ | <li> | ||
+ | If my setglobal has been populated in C16 and then I read it in C32 and there is a case of this numeric overflow. Will I get an exception 1 on the getglobal ? | ||
+ | <p> | ||
+ | Similarly if it were in a file would you get the excp=1 on the read. | ||
+ | <p> | ||
+ | If it happens as a result of a mathematical calculation, where do you test for the excp=1 ? | ||
+ | <p> | ||
+ | length 1.0 & local I | ||
+ | <p> | ||
+ | for i=0 to 20 | ||
+ | <p> | ||
+ | i=i+1 ? excp=test for overflow ? | ||
+ | <p> | ||
+ | next i |
Revision as of 23:07, 17 May 2009
Badge:
Str() Function - changed operation.
Jim:
The real problem with the str() function is the use of numeric expressions as the argument to the function. The C16 accumulator was implicitly defined as length 16.8. The c32 accumulator may be much larger. It is currently defined as 64.32.
It is consistent to strip leading spaces from the string, otherwise, you would not know the actual result.
That said, we are open to any change like this if everyone wants it. I just think it is short sighted to always want C32 to behave exactly like c16.
We could also only strip the string if the argument were an expression. We could also, treat expressions as arguments to the str function as if the accumulator were 16.8.
Changing from one version of a language to another requires a re-compile. It is really the only opportunity we have to change behavior. I think we should also look at the obsolete fields in fstat() for instance.
The other big change is the unexpected error 1 if a numeric expression overflows the variable it is assigned to.
Length 3.2 & local I
I = 1234
will produce an excp=1.
Badge
This numeric overflow thing.
Similarly if it were in a file would you get the excp=1 on the read.
If it happens as a result of a mathematical calculation, where do you test for the excp=1 ?
length 1.0 & local I
for i=0 to 20
i=i+1 ? excp=test for overflow ?
next i