[Gambas-user] [Fwd: Gambas3 Pointers example]

Jussi Lahtinen jussi.lahtinen at ...626...
Sat Jan 8 21:07:28 CET 2011


> hMemory = Memory pPointer For Read Write
> Write #hMemory, 10 As Integer
>
> is there any other way that i did not notice?
>

I'm not sure I understand what do you mean/need...
Documentation gives two options;

*WRITE* [ *#* *Stream* *,* ] *Expression* *AS* *Datatype*
*WRITE* [ *#* *Stream* *,* ] *String* [ *,* *Length* ]

But I personally use streams just for reading data from external functions.
So, in other words, my third option is to pass pointer to external function
and let it write to stream.

You can see example from my GambasTester project (attached), just search
"modf".
Here is C++ reference:
http://www.cplusplus.com/reference/clibrary/cmath/modf/

Jussi
P.S. Test will not pass right now, because some new functions (possibly
obsolete) are missing from test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GambasTester-0.9.15.tar.gz
Type: application/x-gzip
Size: 14952 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20110108/a66f88f8/attachment.bin>


More information about the User mailing list