Handles the default case when no other case matches the expression in a switch statement.
Other
<cfdefaultcase />
[] = Optional attribute
No Attributes
Example 1:
<cfloop list="bark,meow,moo,neigh,woof,ker-splat" index="sound"> <div> <cfoutput> <cfswitch expression="#sound#"> <cfcase value="bark,woof"> Found a dog! </cfcase> <cfcase value="meow"> Found a cat! </cfcase> <cfcase value="moo"> Found a cow! </cfcase> <cfcase value="neigh"> Found a horse! </cfcase> <cfdefaultcase> What animal makes a "#sound#" sound!?! </cfdefaultcase> </cfswitch> </cfoutput> </div> </cfloop>