Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
POKE STRING and @string$
#4
LCD Wrote:I was expecting, it was a pointer, but I ran into the problem in a sub:
Code:
SUB test(a$ as string)
PRINT PEEK(Uinteger, @a$)
END SUB
If the String is defined in the header of the SUB, it points to a completly wrong adress (I got one on the Attribute area of screen), but thank to your tip boriel, I found a workaround:
Code:
SUB test(a$ as string)
DIM dummy$
dummy$=a$
PRINT PEEK(Uinteger, @dummy$)
END SUB
Now I got the correct adress...
Not sure, but @parameter should work too. I will investigate it further, as you might catched a bug. @parameter addresses are not in a fixed ram position (the global variables memory block) but in the stack (which is a dynamic one). So, will have a look...
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)