PDA

View Full Version : Problems / Core / ASCIIZ initialization



Petr Schreiber
14-09-2008, 18:38
Hi Eros,

I found a problem in core or parsing.
Try following:


uses "Console"

local a AS ASCIIZ * 256 = "Ciao"
local b AS ASCIIZ * 256 value "Ciao"

PRINTL "A =", a
PRINTL "B =", b
waitkey

For a I get nothing, for b I get correct value. So it seems VALUE is not the same as equal sign in this case.


Thanks,
Petr

ErosOlmi
14-09-2008, 18:44
I think that problem is related to every fixed string.
Parser try to compute 256 = "Ciao" as a numeric statement resulting in logical expression always evaluating to %FALSE so zero.

I'm trying to get a way to avoid this behave.

Thanks for finding it.
Eros