Procedur with string pointer as argument

Just starting out? Need help? Post your questions and find answers here.
Wolfram
Enthusiast
Enthusiast
Posts: 568
Joined: Thu May 30, 2013 4:39 pm

Procedur with string pointer as argument

Post by Wolfram »

Why is this not working?
How can I use a pointer of a string in this case?

Code: Select all

Procedure.s Test(*Path.string)
Debug *Path\s  ;Memmory Error
EndProcedure

file.s ="ABCD"
 
Debug Test(@file)
This works.

Code: Select all

xfile.string
xfile\s ="ABCD"
 
Debug Test(@xfile)
macOS Catalina 10.15.7
fryquez
Enthusiast
Enthusiast
Posts: 369
Joined: Mon Dec 21, 2015 8:12 pm

Re: Procedur with string pointer as argument

Post by fryquez »

It's not a direct pointer.

Code: Select all

Procedure.s Test(*Path)
  Protected *s.string = @*Path
  Debug *s\s
EndProcedure

file.s ="ABCD"
 
Debug Test(@file)
Post Reply