[futurebasic] Re: Stuff

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: tatewake@... (Terence Jordan)
Date: Mon, 24 Nov 1997 07:46:30 -0400
>Similarly, it wouldn't look at this
>
>LONG IF ArcCheck% = - 2
>
>unless it was written like
>
>LONG IF ArcCheck% = (-2)
>

It's looking at the parenthesis and saying:
(-2)=something other than integer(Long Int, for instance)
     ^^^
This is what's in the "Optomize expressions as blah" (should usually be
Integer) in your FB prefs.


So this fails:
ArcCheck% = -2&
^^
Incompatible types! This is how the compiler interprets (-2)!

But, this would work groovily:

LONG IF (ArcCheck%) = (-2)
^^
The compiler thinks & == &, and if they're the same "value" after that,
you're all set.

or

LONF IF ArcCheck% = -2

for the simple fact you are converting both to the same type in both cases.

Remember that integers only go up to 00FFx0, while long int's go up to
FFFFx0. The negative bit is probably playing a factor in this, but where, I
just don't know, since I'm pretty sure:
0002x0 == 0002x0

and the compiler may be using 2's or just simply using 007Fx0 as it's base,
and -2 at this point is equal to either 00FEx0 or 0081x0

But I'm not sure which. I actually may be totally off on that last part. :-)

Good luck to ya'.



-- Terence Jordan (tatewake@...)
Inspired Software. http://inspired.netstreet.net/
Macintosh, Dos, Windows, and BeOS software solutions.
Phone: 407-728-7563
............................................
. New: Renegade Space Ninja for Macintosh! .
.      Visit our page for more info.       .
............................................