home *** CD-ROM | disk | FTP | other *** search
- <!--- This example shows the use of ArrayMax and ArrayMin --->
- <HTML>
- <HEAD>
- <TITLE>ArrayMax Example</TITLE>
- </HEAD>
-
- <BASEFONT FACE="Arial, Helvetica" SIZE=2>
- <BODY bgcolor="#FFFFD5">
-
- <H3>ArrayMax Example</H3>
- <P>
- This view-only example uses ArrayMax and ArrayMin
- to determine the largest and smallest elements
- in an array.
- <P>
- See the View Example pane to view the code.
- <!--- create an array and run a standard search --->
- <!---
- <CFSET myNumberArray = ArrayNew(1)>
-
- <CFSEARCH NAME="SearchSnippets"
- COLLECTION="snippets"
- TYPE="simple"
- CRITERIA="Array*">
- <CFSET temp = 1>
- --->
- <!--- output the results of the search --->
- <!---
- <CFOUTPUT QUERY="SearchSnippets">
- <CFSET myNumberArray[temp] = score>
- <CFSET temp = temp + 1>
- </CFOUTPUT>
- <CFOUTPUT>
- The largest numeric element of the
- #ArrayLen(myNumberArray)# elements
- is #ArrayMax(myNumberArray)#. The smallest element
- is #ArrayMin(myNumberArray)#.
- </CFOUTPUT>
- --->
-
- </BODY>
- </HTML>
-