case

Description

The case tag is a component which is used in a switch statement. It matches a specific value of the variable used in the switch.

Parameters

Attribute Description Required
value The value to match against the value used in the switch
Yes.

Parameters specified as nested elements

The following tags may be used in a case statement:

arg

value

switch

arglist

Examples

<switch attribute="debug"
<case value="true">
<arg value="-g"/>
</case>
<case value="false">
<arg value="-Os"/>
</case>
</switch>
The above example will add"-g" or "-Os" to the command line depending on the value of the attribute "debug".