it is possible to pass by reference or by value to a TCF function, but
probably not in the way you are used to:

-----------------------------------
here's how to pass by value:
MyTCFFunc("@@local$myvariable")

inside your tcf function, your function's parameter will contain the
value that local$myvariable did.  you can do whatever you want to the
string and it wont change the origional variable.
-----------------------------------
here's an example of passing by reference:
MyTCFFunc("local$myvariable")

inside your tcf function, your function's parameter will contains the
value"local$myvariable", instead of the value of that variable.

Let's say your function's first param is called "local$myparam", you
can read/write the parameter like this, thus read/writing the actual
origional variable (thus you have essentialy passed the variable by
reference):

read the variable:
<@var name="@@local$myparam">

write:
<@assign name="@@local$myparam" value="value goes here">
-----------------------------------

Hope that helps!
Alan

On 8/8/05, Bill Conlon <[EMAIL PROTECTED]> wrote:
> In the Studio, parameters passed by reference (as a variable) instead
> of by value, cannot in method scope.
> 
> Does anyone understand this limitation?  I have some methods that
> manipulate strings in place, and I would like to use them within a TCF.
>   But it looks like I have either pass by value, or copy to a request
> scope variable.  This seems
> * inefficient
> * potentially dangerous (could inadvertently clobber an existing
> request scope variable).
> 
> Is this a bug?
> 
> 
> ________________________________________________________________________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to