Page 1 of 1

[SOLVED] How to get Text from a text pointer

Posted: Sat Apr 24, 2010 1:45 pm
by avatar
I refer to the manual about the pointer, my codes below cannot retrieve the text.
Please help
Example:
Text$ = "Hello"
*Text = @Text$ ; *Text store the address of the string in memory
*Pointer.String = @*Text ; *Pointer points on *Text
Debug *Pointer\s ; Display the string living at the address stored in *Pointer (i.e. @Text$)

Code: Select all

Procedure.s getText(*textAddress)
  ProcedureReturn *textAddress\s ; <----------------- ERROR
EndProcedure
text.s = "testing text"
Debug getText(@text)

Re: How to get Text from a text pointer

Posted: Sat Apr 24, 2010 1:47 pm
by srod

Code: Select all

Procedure.s getText(address)
  Protected *textAddress.STRING = @address
  ProcedureReturn *textAddress\s ; <----------------- ERROR
EndProcedure
text.s = "testing text"
Debug getText(@text)

Re: How to get Text from a text pointer

Posted: Sat Apr 24, 2010 1:50 pm
by avatar
Thank you for your help

Re: [SOLVED] How to get Text from a text pointer

Posted: Sat Apr 24, 2010 1:51 pm
by srod
You're welcome.