I see.

Thanks

--Original Message Text---
From: [EMAIL PROTECTED]
Date: Mon, 20 Oct 2003 14:08:47 +0100

<cfset theExt = right(SESSION.strFile[i]4) >
<cfswitch _expression_="#theExt#">
    <cfcase value=".txt">
        ..
    </cfcase>

    <cfcase value=".pdf">
        ..
    </cfcase>

    <cfcase value=".txt">
        ..
    </cfcase>

    .... and so on ....

    <cfdefaultcase>
        ...
    </cfdefaultcase>
</cfswitch>

-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: 20 October 2003 13:52
To: CF-Talk
Subject: RE: Nested <cfelse...

I've never used <cfelseif and <cfswitch/cfcase. Could you give me an
example using my below code?

--Original Message Text---
From: Hugo Ahlenius
Date: Mon, 20 Oct 2003 14:44:03 +0200

Bushy,

Are you aware of cfelseif and cfswitch/cfcase? Did you check the
performance of you current code (is it a huge issue?). I am not sure if
cfelseif or cfswitch runs that much faster, but it sure would make
cleaner
code.

-------------------------------------------------------------
Hugo Ahlenius                  E-Mail: [EMAIL PROTECTED]
Project Officer                Phone:            +46 8 230460
UNEP GRID-Arendal              Fax:              +46 8 230441
Stockholm Office               Mobile:         +46 733 467111
                               WWW:       http://www.grida.no
-------------------------------------------------------------

| -----Original Message-----
| From: Bushy [mailto:[EMAIL PROTECTED]
| Sent: Monday, October 20, 2003 14:41
| To: CF-Talk
| Subject: re: Nested <cfelse...
|
|
| 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]

Reply via email to