Restored from previous forum. Originally posted by tinman.
Hi,
Not wanting to start another huge thread, but is there any way I can get the address of the string pointer, not the string.
So imagine you have a$="foo". @a$ will give you the address of the f character. Is there any way to get the address where the a$ pointer is located?
My main interest in this is with arrays, since
@array$(0) gives you a pointer to the first string in the array, and not the start of the array.
Thanks.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
More string pointer nonsense
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by horst.
Look at this:
Horst
Look at this:
Code: Select all
string.s = "Hello"
location_of_string = @string
location_of_pointer = @location_of_string
Debug string
Debug Str(location_of_string)
Debug Str(location_of_pointer)
Debug PeekS(PeekL(location_of_pointer))
Horst
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm