<cfswitch _expression_="#right(session.strFile[i], 4)#">
<cfcase value=".txt">stuff</stuff>
<cfdefaultcase>whatever</cfdefaultcase>
</cfswitch>
<cfswitch _expression_="#right(session.strFile[i], 4)#">
<cfcase value=".log">stuff</stuff>
<cfdefaultcase>whatever</cfdefaultcase>
</cfswitch>
<cfswitch _expression_="#right(session.strFile[i], 4)#">
<cfcase value=".pdf">stuff</stuff>
<cfdefaultcase>whatever</cfdefaultcase>
</cfswitch>
--Original Message Text---
From: Patricia G. L. Hall
Date: Mon, 20 Oct 2003 05:02:07 -0400 (EDT)
Check the documentation on cfswitch and right() for correct syntax, but
this is the idea below.
<cfswitch _expression_="#right(session.strFile[i], 4)#">
<cfcase value=".txt">stuff</stuff>
<cfdefaultcase>whatever</cfdefaultcase>
</cfswitch>
> Hi,
>
> I have a piece of code where I'm checking a session variable
>
> <cfif right(SESSION.strFile[i]4) is ".txt">
> Do this...
> <cfelse>
> <cfif right(SESSION...
> Do this...
> <cfelse>
> <cfif right(SESSION...
> Do this...
> <cfelse>
> <cfif right(SESSION...
> Do this...
>
> This goes for 20 nested <cfelse>. Is there a way to do this so it run
> faster? Is it better to just end each <cfif with a </cfif> or nest them?
>
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

