It seems to be kind of poor not to be able to use switch on a string.  If I
use the dept number say (0305) instead of the name would this work or would
Java freak on the 0 (zero).  Our database treats these fields as varchar since
the zero in front has meaning to the accounting people.

Mario

-----Original Message-----
From: Nick de Voil [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 29, 2004 10:05 AM
To: CF-Talk
Subject: Re: Question for Java people on this list: Converting a CF app
to JS P


Mario

> Does anyone know if this can be done with the SWITCh statement in JSP.
Can
> switch be used on strings --- I have been told yes and no by different
people

No, afaik the switch statement in Java needs a simple scalar type such as
int or char.

I suggest you use if...else if.

Nick






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188929
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to