RE: Passing variables in UDF

2001-09-13 Thread Dave Watts
> Lets look at the difference between a function that works on > variables vs. one that works on an array. ucase(attribute) > returns the attribute after it has been made all uppercase. > ArrayResize(array, minimum_size) - this will resize the array > that you pass to it. The array is NOT retur

RE: Passing variables in UDF

2001-09-12 Thread Jeremy Allen
> >Of course, in the long run, it really doesn't matter, as long as we know >what behavior to expect. However, there are useful benefits to passing >structures by reference to custom tags. For example, let's say we wanted to >filter input. Ideally, we could use an external component for that, sinc

RE: Passing variables in UDF

2001-09-12 Thread Dave Watts
> > > Are variables passed by reference or by value in CF UDFs? > > > > Queries, structures, and variables created using CFOBJECT > > are passed by reference. Other variables are passed by value. > > This is true whether passing them to UDFs or custom tags or > > whatever, as far as I can tell.

RE: Passing variables in UDF

2001-09-12 Thread Raymond Camden
ot; - Yoda > -Original Message- > From: Michael Dinowitz [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 10, 2001 3:44 PM > To: CF-Talk > Subject: RE: Passing variables in UDF > > > While I can understand this in a UDF, I just can't understand > why this is

RE: Passing variables in UDF

2001-09-10 Thread Michael Dinowitz
Lets look at the difference between a function that works on variables vs. one that works on an array. ucase(attribute) returns the attribute after it has been made all uppercase. ArrayResize(array, minimum_size) - this will resize the array that you pass to it. The array is NOT returned as a fu

RE: Passing variables in UDF

2001-09-10 Thread Dave Watts
> I was wrong in saying that an array was passed by reference. > I just tested it out and it is passed by value. I was assuming > based on the normal array function results that it would be. I > hate when things are not 'standard'. I'm not sure I understand what you mean by this (that is, "bas

RE: Passing variables in UDF

2001-09-10 Thread Shawn Grover
string variable in the calling page. -- I shoulda looked it up sooner. Sorry... Shawn Grover -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 1:35 PM To: CF-Talk Subject: RE: Passing variables in UDF I was

RE: Passing variables in UDF

2001-09-10 Thread Shawn Grover
, September 10, 2001 1:35 PM To: CF-Talk Subject: RE: Passing variables in UDF I was wrong in saying that an array was passed by reference. I just tested it out and it is passed by value. I was assuming based on the normal array function results that it would be. I hate when things are not 'sta

RE: Passing variables in UDF

2001-09-10 Thread Carlisle, Eric
Thanks, Micheal. I appreciate taking the time to do the fieldwork :). EC -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 3:35 PM To: CF-Talk Subject: RE: Passing variables in UDF I was wrong in saying that an array was

Re: Passing variables in UDF

2001-09-10 Thread Howie Hamlin
They are passed by value. You can see this from this simple code: === function AddOne(n) { return n+1; } n+1=#AddOne(num)# num=#num# === HTH, Howie Hamlin - inFusion Project Manager On-Line Dat

RE: Passing variables in UDF

2001-09-10 Thread Michael Dinowitz
While I can understand this in a UDF, I just can't understand why this is true for a custom tag. I just tried it out and an array is passed by value to a custom tag. A structure is passed by reference. This totally breaks the paradigm of custom tags being "totally independent processes". At 03

RE: Passing variables in UDF

2001-09-10 Thread Michael Dinowitz
I was wrong in saying that an array was passed by reference. I just tested it out and it is passed by value. I was assuming based on the normal array function results that it would be. I hate when things are not 'standard'. Causes an error function test(aVar) {

RE: Passing variables in UDF

2001-09-10 Thread Dave Watts
> Are variables passed by reference or by value in CF UDFs? Queries, structures, and variables created using CFOBJECT are passed by reference. Other variables are passed by value. This is true whether passing them to UDFs or custom tags or whatever, as far as I can tell. Dave Watts, CTO, Fig Lea

RE: Passing variables in UDF

2001-09-10 Thread Raymond Camden
If the var is simple or array, then it is by value. If you pass in a struct or a query, then it is by ref. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus

Re: Passing variables in UDF

2001-09-10 Thread Michael Dinowitz
Simple variables are passed by value. Complex variables (query, structure, array) are passed by reference. I think that object variables are also passed by reference. At 01:24 PM 9/10/01, you wrote: >Are variables passed by reference or by value in CF UDFs? > > Thanks, > > ~