Unfortunately, every parameter passed in a function (user defined or builtin) is passed by value ... even parameters that one wouldn't expect to be passed by value are, for example, read Ruud's comments about UBOUND in this thread (in bold):

Pipe - Submits a shell command and redirects output to an array

Bottom line was that the UBOUND() function was passing arrays by value - so when checking huge arrays frequently, performance would degrade exponentially ... Ruud has since fixed this "problem" in the latest Beta 4.02 ...

This is the only way I can think of to "fake it" :


break on


$var = 1


func("$$var") ; <--- pass var by reference


?"var=" $var


exit 1


function func($parm)
$=execute("$parm=2")
endfunction

-Shawn

[ 15 January 2002: Message edited by: Shawn ]