pass by reference

Everything else that doesn't fall into one of the other PB categories.
Fable Fox
User
User
Posts: 29
Joined: Fri Dec 12, 2003 4:52 am

pass by reference

Post by Fable Fox »

does pb procedure support pass by reference, you know,

like func(a,b,c,d)
a = a* 2
....


where after the func is called, the value of a, b, c & d is changed

thanks.
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: pass by reference

Post by traumatic »

something like this?

Code: Select all

Procedure LikeThis(*a.LONG)
  *a\l = 5
EndProcedure

LikeThis(b.LONG)
Debug b\l
Good programmers don't comment their code. It was hard to write, should be hard to read.
Post Reply