'@' can't be used to get string address

Just starting out? Need help? Post your questions and find answers here.
bbanelli
Posts: 107
Joined: Mon Jul 13, 2015 7:40 am

'@' can't be used to get string address

Post by bbanelli »

I don't know if this is a bug or a feature, but both PeekC and PeekU have 'offset' parameter and I can't access string via @.

Code: Select all

Define s.s
s = "abcdefgh"
Debug PeekU(@s, 0)
Image

This code doesn't work as well returning the same error:

Code: Select all

Text$ = "Hello"
*Text = @Text$
What is the purpose of offset? Is there a point of using PeekC; that is, shouldn't all code be Unicode anyway?
"If you lie to the compiler, it will get its revenge."
Henry Spencer
http://www.pci-z.com/
Fred
Site Admin
Posts: 1821
Joined: Mon Feb 24, 2014 10:51 am

Re: [SB 2.00 b7] '@' can't be used to get string address

Post by Fred »

String in SB aren't memory buffer, that's why you can't access them.
Post Reply