Casting, dereferencing & C.
Posted: Thu Jun 03, 2021 12:55 pm
The following test lines of code in VO always return 5, instead in X# dont' work as expected:
The output of "strange results" line is alway different at each run, the second is always correct.
The test app is compiled in VO dialect with /unsafe + /vo7
TIA for the help
Antonello
Code: Select all
FUNCTION Start( ) AS VOID
LOCAL DIM p[4] AS BYTE
p[1] := 5
System.Console.WriteLine( AsString( DWORD(@p[1]))) //strange results
System.Console.WriteLine( Bin2DW(Mem2String( @p[1],4)) ) //correct result
RETURN
The test app is compiled in VO dialect with /unsafe + /vo7
TIA for the help
Antonello