Well, in the meantime, we could probably formalize a standard for passing values by reference, like this example UDF called Add() that adds the first parameter (byval) to the second (byref) ... it would just have to be understood how one used the function. Not a normal function by any stretch of the imagination


break on


$Number = 2


Add(10,"$$Number")


?"Number=" $Number


exit 1


function Add($Var1,$Var2ByRef)
;
; Add Var1 to Var2 (byref) and put result back into Var2 (byref)
;
$ = Execute("$Var2ByRef = $Var1 + $Var2ByRef") ; do it
endfunction

I was hoping we could have just gotten away with this syntax:

Add(10,$$Number)

and I thought that maybe when kixtart would have seen the double-dollar sign, it would have treadted $$Number as a string "$$Number" ... too back but it didn't work ... but it might be a good suggestion to Ruud (if he did decide to ever implement passing byref), for example saying this:

Function Add($Var1,$$Var2)
...
EndFunction

is the same as saying this:

Function Add($Var1,$Var2 ByRef)
...
EndFunction

[shrug]

-Shawn