Passing unknown number of referenced variables to a function

K nnoydb at excite.com
Thu Oct 28 10:39:41 EDT 2004


I posted the exact question some time ago and was told it is not possible.

Kevin



-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Wed 10/27, Trevor DeVore < lists at mangomultimedia.com > wrote:
From: Trevor DeVore [mailto: lists at mangomultimedia.com]
To: use-revolution at runrev.com
Date: Wed, 27 Oct 2004 11:21:50 -0700
Subject: Passing unknown number of referenced variables to a function

Is it possible in transcript to have a function that supports the <br>passing of multiple referenced variables and assigning values to those <br>variables?  The idea is that I could define a function like this:<br><br>function myFunction @pData<br>	repeat with i = 1 to paramCount()<br>		put "someData" into paramVar(i)<br>	end repeat<br>end function<br><br>Where the function could loop through the number of parameters and put <br>values into the variables that were passed by reference.  It seems you <br>can only get the value of a parameter that was passed in but not <br>defined in the function definition, not the actual variable name <br>(variableNames reports the defined variables).<br><br>I guess I could just define a bunch of parameters (ie. @pData1, <br>@pData2, @pData3, etc.) and then loop through the parameters that way <br>but I'm hoping there is a more elegant way.<br><br><br>-- <br>Trevor DeVore<br>Blue Mango Multimedia<br>trevor at mangomultimedia.com<br><br>_______________________________________________<br>use-revolution mailing list<br>use-revolution at lists.runrev.com<br>http://lists.runrev.com/mailman/listinfo/use-revolution<br>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


More information about the use-livecode mailing list