[Gambas-devel] ideas for two new string functions
Benoît Minisini
gambas at ...1...
Wed Nov 24 02:33:58 CET 2010
In revision #3318, you now have a function named Mem$() that returns a string
representation of a value.
For example:
Mem$(10) will return the 4 characters string "\x0A\x00\x00\x00".
Mem$(Pi) will return the 8 characters string representing the Pi number as it
is stored in memory.
And so on...
To do the contrary, you now must use the Int@(), Float@()... functions that
read a value directly into memory.
For example:
Dim sStr As String
sStr = Mem$(Pi)
Print Float@(VarPtr(sStr))
--> 3.14159265...
Regards,
--
Benoît Minisini
More information about the Devel
mailing list