MACROMEDIA COLFUSION MX 7-CFML Reference page 481

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

ArrayResize
Description
Resets an array to a specified minimum number of elements. This can improve performance, if
used to size an array to its expected maximum. For more than 500 elements, use
immediately after using the
ColdFusion arrays expand dynamically as data is added.
Returns
True, on successful completion.
Category
Array functions
Function syntax
ArrayResize(array, minimum_size)
Parameters
Parameter
array
minimum_size
Example
<h3>ArrayResize Example</h3>
<!--- perform a query to get the list --->
<cfquery name = "GetCourses" datasource = "cfdocexamples">
SELECT * FROM Courses
</cfquery>
<!--- make a new array --->
<cfset MyArray = ArrayNew(1)>
<!--- resize that array to the number of records
in the query --->
<cfset temp = ArrayResize(MyArray, GetCourses.RecordCount)>
<cfoutput>
The array is now #ArrayLen(MyArray)# elements, to match
the query of #GetCourses.RecordCount# records.
</cfoutput>
tag.
ArrayNew
Description
Name of an array
Minimum array size
ArrayResize
ArrayResize
481

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents