> i made an example for StrPtr, it is the next one, > > ' Gambas module file > > PUBLIC SUB Main() > > DIM p AS Pointer > DIM s AS String > > p = Alloc("this is a string") > > 'READ #p, s > s = StrPtr(p) > PRINT s > Free(p) > > END > > I just want to question what is the difference between > 'READ #p, s > s = StrPtr(p) > > both of them make the same work.
Where did you see that? StrPtr() reads a C-like strig in memory (i.e. a string terminated by a zero character). READ #p, s reads the length of the string first (in a Gambas multi-bytes specific internal format) and then reads the needed number of characters. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user