<!--- This view-only example shows the use of ArrayAvg --->
<HTML>
<HEAD>
<TITLE>ArrayAvg Example</TITLE>
</HEAD>

<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY  bgcolor="#FFFFD5">
	
<H3>ArrayAvg Example</H3>
<P>
This view-only example uses ArrayAvg
to determine the average of the elements
in an array.
<P>
See the View Example pane to view the code.
<!--- create an array --->
<!---
<CFSET myNumberArray = ArrayNew(1)>
--->
<!--- run a standard search --->
<!---
  <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>
--->
<!--- use ArrayAvg to get the average score --->
<!---
<P>The average score for your search on the term
"Array*" in the collection "Snippets" is 
<CFOUTPUT>#ArrayAvg(myNumberArray)# for
#SearchSnippets.RecordCount# "hits"<BR>
</CFOUTPUT>
--->

</BODY>
</HTML>       
