The following SB code does not define the PB internal pointer properly:
Code: Select all
Global i
Dim S.l(2)
Global *Sp = @S()
PokeL(*Sp, 0, 42)
PokeL(*Sp, 1, 1984)
PokeL(*Sp, 2, 2012)
For i = 0 To 2
debug s(i)
Next
The slightly modified code in PB works fine:
Code: Select all
Global i
Dim S.l(2)
Global *Sp = @S()
PokeL(*Sp, 42)
*sp+SizeOf(long)
PokeL(*Sp, 1984)
*sp+SizeOf(long)
PokeL(*Sp, 2012)
For i = 0 To 2
Debug s(i)
Next