function arguments

BlitzMax Forums/BlitzMax Beginners Area/function arguments

matibee(Posted 2009) [#1]
Silly beginners question, I've searched without luck..

If I want to write a function that has destination variables in it's arguments, how do I tell bmax that they aren't normal arguments. Like non-const byref arguments in C++.

silly example:
Function swap( f#, t# )
	i# = f
	f = t
	t = i
End Function

i# = 99.99
j# = 11.11

Print i + ", " + j
swap( i, j )
Print i + ", " + j 


Thanks


matibee(Posted 2009) [#2]
Sorry found it by looking through all the bmax keywords.

:)

Function swap( f# var , t# var )
	i# = f
	f = t
	t = i
End Function

i# = 99.99
j# = 11.11

Print i + ", " + j
swap( i, j )
Print i + ", " + j