You can use a <CFTry> block:

<cftry>
  <cfset x = A[1][i]>
  Exists
  <cfcatch type="Expression">
        Doesn't exist
  </cfcatch>
</cftry>

> -----Original Message-----
> From: Jens [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, April 01, 2000 12:37 AM
> To: cf-talk
> Subject: Array-Field [1][1][X] exist???
> 
> 
> How can I test, whether exist a Array, such as MyArray[1][1][8][1][6][4]
> The example works not right.
> What can I do????
> 
> example:
> <CFSET A = ArrayNew(2)>
> <CFSET A[1][1] = "a1"> <CFSET A[1][2] = "a1"> <CFSET A[1][5] = "a5">
> <cfloop index="i" from="1" to="#ArrayLEN(A[1])#" step="1">
>  <cfoutput> Array A[1]#i#
>  <cfif IsDefined(A[1][i])>
>   exist
>  <cfelse>
>   not exist
>  </cfif><br>
> </cfoutput>
> </cfloop>
> 
> ------------------------------------------------------------------
> ------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit 
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> _talk or send a message to [EMAIL PROTECTED] with 
> 'unsubscribe' in the body.
> 
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to