Talk:Comet32

From CometWiki

(Difference between revisions)
Jump to: navigation, search
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.

  • As mentioned on Forum, I use the Str() function to convert a numeric to string for a percentage that is then used in the key of a file to rank slaes. This change negates that.
  • Robert has a problem with it also, details on Forum. Just typing this to see how it appears. How do you know who says what on a Wiki ?

    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

  • Fair enough, I can work around my problem fairly easily.
  • I agree that we should take this chance to get rid of old & irrelevant stuff.

    This numeric overflow thing.

  • 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 ?

    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

  • Personal tools