TH> ==============================
TH> FOR x?? = 10 to 1 STEP -1
TH> ? x??
TH> NEXT
TH> ==============================
AM> That example should give you an Error 6-- Overflow.
Nope. Or, maybe it does, I have to check again. Wait....
AM> If it is being ignored, it sounds like you have the numeric error
> checking turned off.
Nope.
AM> In the IDE it is under the top menu, Options/Compiler/Error
> Tests.
All checking is enabled.
I think the problem is that PB uses the same data type for its
in/decriment count which for type WORD can't be negative. Thus,
increment values work, but decrement values do not.
AM> I think I recall that PB uses the data type of the variable to
> hold the STEP amount. So it errors out when it tries to assign a
> negative value to a word. Makes sense, I suppose; it's probably
> more efficient than trying to subtract an integer from a word.
Ahh, yes, I said that before reading to this point, and concur with
your opinion.
Thanks, Anton.
Have a nice day...
___ Blue Wave/QWK v2.12
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)
|