<cfscript>
        switch( variable ){
                case "1": message = "whatever"; break;
                case "2": message = "whatever"; break;
                default: message = "whatever";
        }
</cfscript>

                                                    
Bryan Love ACP
Internet Application Developer
[EMAIL PROTECTED]
                                                    


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 12:34 PM
To: CF-Talk
Subject: CFSCRIPT "switch" Brain Burp


Looking for cfscript guru...

I know the answer to this is sooooo simple, but I have tried everything...I
think...
and the next step right now seems to be... asprin, chicken soup and
medication.

I tried:
switch abc; switch 'abc', switch '#abc#', switch #abc#;
switch (abc); switch ('abc'), switch ('#abc#'), switch (#abc#);

and in the output, when the program doesn't get caught up in errors due
to ' or " or #,   abc = r and txt_status always = Unknown

I just don't know what to do next.

What is the secret? how do i script the switch "???abc???" so it works?  

<CFSCRIPT>
    abc = 'r';
    switch (???abc???) {
        case "s":{txt_status = 'Initial Submission';}
        case "r":{txt_status = ' Revision';}
        case "a":{txt_status = 'Administration Revision';}
        case "j":{txt_status = 'Previously Rejected';}
        case "p":{txt_status = 'Processed and updated';}
        case "d":{txt_status = 'Previously Deleted';}
        default:{txt_status = 'Unknown';}
    }
    
</CFSCRIPT>
<CFOUTPUT>#abc#<BR>#txt_status#</CFOUTPUT>

Thank you, in advance, 
Carol



Carol L. Bluestein
Senior Programmer
NYS Office of Real Property
518-486-6335
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to