<CFSWITCH EXPRESSION="expression">
<CFCASE VALUE="value" DELIMITERS="delimiters">
HTML and CFML tags
</CFCASE>
additional <CFCASE></CFCASE> tags
<CFDEFAULTCASE>
HTML and CFML tags
</CFDEFAULTCASE>
</CFSWITCH>
EXPRESSION
Required. Any ColdFusion expression that yields a scalar value. ColdFusion converts integers, real numbers, Booleans, and dates to numeric values. For example, TRUE, 1, and 1.0 are all equal.
VALUE
Required. One or more constant values that CFSWITCH compares to the specified expression (case-insensitive comparison). If a value matches the expression, CFSWITCH executes the code between the CFCASE start and end tags.
Separate multiple values with a comma or an alternative delimiter, as specified in the DELIMITERS parameter. Duplicate value attributes are not allowed and will cause a runtime error.
DELIMITERS
Optional. Specifies the character that separates multiple entries in a list of values. The default delimiter is the comma (,).
|