[futurebasic] hexadecimal oddity with a WORD....

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

From: Michael Evans <michaelevans_01@...>
Date: Tue, 23 Nov 2004 23:17:10 -0500
Hello all:

Here are three methods of checking the first two bytes of a JPEG file, 
which should be &ffd8...

  -----------------------
DIM AS UNSIGNED WORD temp

//method 1 succeeds
temp =  peek word([fileH])
long if temp = &ffd8
end if

//method 2 succeeds
long if peek word([fileH]) = &ffffffd8
end if

//method 3 fails
long if peek word([fileH]) = &ffd8
end if

I'm just
why does method 3 fail?

is this just one of those illogical syntax things?

Cheers,

-------------------
Michael Evans
[SFSG]
-------------------