[Gambas-user] [Fwd: Gambas3 Pointers example]
Jussi Lahtinen
jussi.lahtinen at ...626...
Sun Jan 9 15:00:39 CET 2011
> Here is another question-case.
>
> i Alloc 12 bytes.
> i set in memory an integer 4 bytes
> then i set in memory a float 8 bytes.
>
> i can read the memory stream with READ, ok!
>
> How can i to this with Integer@() and Float@() functions?
> How can i move inside memory and use Integer@() and Float@()
>
I haven't try this in gambas, but in C/C++ variables are in memory in
straight row without any metadata.
I assume this is also case in gambas, so;
iFirstInteger = Integer@(pPointer)
iNextInteger = Integer@(pPointer + 4)
Jussi
More information about the User
mailing list