home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / arrayclear.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  770 b   |  30 lines

  1. <!--- This example shows ArrayClear --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>ArrayClear Example</TITLE>
  5. </HEAD>
  6.  
  7. <BODY>
  8. <H3>ArrayClear Example</H3>
  9.  
  10. <!--- create a new array --->
  11. <CFSET MyArray = ArrayNew(1)>
  12. <!--- populate an element or two --->
  13. <CFSET MyArray[1] = "Test">
  14. <CFSET MyArray[2] = "Other Test">
  15. <!--- output the contents of the array --->
  16. <P>Your array contents are:
  17. <CFOUTPUT>#ArrayToList(MyArray)#</CFOUTPUT>
  18. <!--- check if the array is empty --->
  19. <P>Is the array empty?:
  20. <CFOUTPUT>#ArrayIsEmpty(MyArray)#</CFOUTPUT>
  21. <P>Now, clear the array:
  22. <!--- now clear the array --->
  23. <CFSET Temp = ArrayClear(MyArray)>
  24. <!--- check if the array is empty --->
  25. <P>Is the array empty?:
  26. <CFOUTPUT>#ArrayIsEmpty(MyArray)#</CFOUTPUT>
  27.  
  28. </BODY>
  29. </HTML>       
  30.