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 > > > > > > > > > > > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. 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

