[Gambas-user] About StrPtr()

Demosthenes Koptsis demosthenesk at ...626...
Thu Dec 9 11:33:44 CET 2010


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.
What was the necessity to make a StrPtr function? 


-- 
Regards,
Demosthenes Koptsis.





More information about the User mailing list