Your first code called function2 first, and took the result and passed it to
function 1.

Your second example does the reverse.

===========================================================================
Raymond Camden, Director of Development for Mindseye, Inc (www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : cfjedimaster

"My ally is the Force, and a powerful ally it is." - Yoda  

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Sam Clement
> Sent: Tuesday, December 07, 2004 1:47 PM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] Nested Functions
> 
> I have some functions that accept arrays and then return 
> arrays - nothing particularly special.
> 
> They seem to work when nested:
> 
> <cfdump var="#function1(function2(myArray))#">
> 
> However when I try and load a functions' return array into a variable:
> 
> <cfset a = function1(myArray)>
> 
> And then use another function (expecting an array) on that variable:
> 
> <cfset b = function2(a)>
> 
> I get this:
> 
> Element 1 is undefined in a Java object of type class 
> coldfusion.runtime.Array referenced as 
>  
> The error occurred in D:\Webroot\hf\charts\calculations.cfm: line 97
>  
> 95 :  for (i=1;i lte arrayLen(valuationsArray);i=i+1) {
> 96 :  if (y eq 0) {
> 97 :          monthly[i][1] = valuationsArray[i][1];
> 98 :          monthly[i][2] = 0;
> 99 :          } else {
> 
> Is it me or is this not possible?
> 
> Thanks,
> 
> Sam
>  
> ________________________________
> 
> Sam Clement
> ABOVE Studios
> Boutique Design Solutions
> 
> 32 Clifford St - Belmont
> Trinidad + Tobago - West Indies
> T: (868) 621 5159 W: abovestudios.com 
>       
>  
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email 
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported by 
> Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at 
> [EMAIL PROTECTED]
> 


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at 
[EMAIL PROTECTED]

Reply via email to