Man we have all these great array functions, and they only work on single
dimension arrays. Wish I had known more about that during the CFMX beta.

Tim Heald
ACP/CCFD :)
Application Development
www.schoollink.net

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 24, 2002 3:05 PM
> To: CF-Talk
> Subject: RE: Array questions
>
>
> The CFStudio help says only a single dimensional array.
>
> ~Todd
>
> On Fri, 24 May 2002, Timothy Heald wrote:
>
> > Didn't know there was an arrayAvg() function.  Should work on a multiple
> > dimension array like this:
> >
> > arrayAvg(studentInfo[5])
> >
> > Tim Heald
> > ACP/CCFD :)
> > Application Development
> > www.schoollink.net
> >
> > > -----Original Message-----
> > > From: Rob Baxter [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, May 24, 2002 2:43 PM
> > > To: CF-Talk
> > > Subject: RE: Array questions
> > >
> > >
> > > No need to reinvent the wheel. How about
> > >
> > > <average = ArrayAvg(avgMark)>
> > >
> > > Don't think it will work on a 2D array but I don't see how your
> > > data fits a
> > > two dimension array.
> > > </rob>
> > >
> > > -----Original Message-----
> > > From: Timothy Heald [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, May 24, 2002 2:29 PM
> > > To: CF-Talk
> > > Subject: RE: Array questions
> > >
> > >
> > > Looks like a neat problem.  Lets see:
> > >
> > > <CFSCRIPT>
> > >
> > > <!--- initialize the total variable to hold the sum of the array's
> > > value --->
> > > total = 0;
> > >
> > > for(i = 1; i lt arrayLen(avgMark); i = i + 1){
> > >   total = total + avgMark[i];
> > > }
> > >
> > >   average = total / arrayLen(avgMark);
> > >
> > > </CFSCRIPT>
> > >
> > > That should do it right?
> > >
> > > Tim Heald
> > > ACP/CCFD :)
> > > Application Development
> > > www.schoollink.net
> > >
> > > > -----Original Message-----
> > > > From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, May 24, 2002 2:15 PM
> > > > To: CF-Talk
> > > > Subject: Array questions
> > > >
> > > >
> > > > If I define a 2 dimensional array with info in it like this:
> > > >
> > > > Element Name    LowMark HighMark        AvgMark
> > > > 1               Fred    22              88              45
> > > > 2               Bob     55              96              83
> > > >
> > > > Is there a way to easily get the average of the average column
> > > > (getting the
> > > > lowest mark and highest should be easy with ArrayMin and
> ArrayMax), or
> > > > would be better off with four single dimension arrays?
> > > >
> > > > T
> > > >
> > > >
> > >
> > >
> >
> 
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to