fb:porticula NoPaste
ZString Ptr Rückgabe
Uploader: | Sebastian |
Datum/Zeit: | 07.06.2013 15:11:06 |
Declare Function GetTextPointerA () As ZString Ptr
Declare Function GetTextPointerB () As ZString Ptr
Dim a as zstring ptr = GetTextPointerA()
Print Chr(34); *a; Chr(34)
Print Cast(UInteger, a)
Print
Dim b as zstring ptr = GetTextPointerB()
Print Chr(34); *b; Chr(34)
Print Cast(UInteger, b)
Print
b = GetTextPointerB()
Print Chr(34); *b; Chr(34)
Print Cast(UInteger, b)
Function GetTextPointerA () As ZString Ptr
Dim Result As ZString Ptr = CAllocate(6)
*Result = "HALLO"
Return Result
End Function
Function GetTextPointerB () As ZString Ptr
Return StrPtr("HALLO")
End Function
'Ausgabe:
'
' "HALLO"
'137619472
'
'"HALLO"
'134528044
'
'"HALLO"
'134528044