> Hello, > > i do not understand the MkXXX$() functions. > > How to use them and where? > > i tried to print the return of them but i did not understand the > representation of memory as string. > > Print MkBool$(True) > gives > ^A
They are doing the same thing as the WRITE instruction from a memory stream, except that they create a string from the written contents. For example, MkInt$(X) will take the integer X and will return a 4 bytes string, as an integer uses 4 bytes in memory. MkBool$(True) returns Chr$(1), but maybe it should return Chr$(255), as, by definition, True <=> -1 in Gambas. These functions are not really useful, because they use the endianness of the system. Whereas READ and WRITE on a stream can use any endianness with the ByteOrder property of the stream. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user