Stanley... you know I thought you were talking about passing variables to a UDF rather than a script. I'm glad you posted this as I'm sure this would have bitten me at some point too.

At one point when I first started using Explicit/DIM, I thought I had to dim the variables in the UDF header within the function, ie...
Code:

function($var1,$var2)
dim $var1,$var2
;...
endfunction


Interestingly it works, but I believe it was Jooel, who smacked me around a bit and told me it only worked because Kix was so forgiving. So try not to make that mistake.