Aidan

It's based on 'C' syntax, which itself isn't very far removed
from machine code - the switch statement is really just a
glorified set of goto statements.

If you don't put the break in, it drops through to the next case.

But it can be useful sometimes if you want to do some processing
for case A and then some processing for case A or B - though
making use of that results in very un-maintainable code.

It's certainly a rich source of bugs, whatever language you're using.

Nick

-----Original Message-----
From: Aidan Whitehall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 10:19 AM
To: CF-Talk
Subject: break


Is there any good reason why CFSCRIPT requires the inclusion of a break;
statement at the end of each case?

It took me a while after looking at Advanced CFWACK 4 (where break; doesn't
appear) and digging around the archives to find out that it's needed. And it
just left me thinking... why?



Aidan
-- 
Aidan Whitehall <[EMAIL PROTECTED]>
Macromedia ColdFusion Developer
Fairbanks Environmental +44 (0)1695 51775



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to