bdfs1m0o | Structured Programming Macros |
Use this macro group to process specific code based on a numeric value, referred to as a case number. The #CASE macro group includes the following macros:
See #CASE Macro Group Processing for a diagram that shows the processing flow of the #CASE macro group.
Format
|
Notes:
Do not use register 0 for reg1.
If you specify the MAX parameter, you must also code a #CASE ERROR statement.
Entry Requirements
None.
Return Conditions
Programming Considerations
#@LBn EQU *
Where:
You can use the PREFIX parameter to change the standard link-label prefix.
A value other than 8, 16, 24, or 32 in R2 will cause results that cannot be predicted.
#CAST R2,POWER=3 #CASE 32,8 : * Code to process if R2 contains 8 or 32 : #CASE 16 : * Code to process if R2 contains 16 : #ECAS
Case numbers 2, 6, 9, and 10 bypass the structure, and processing continues with the instruction after the #ECAS macro.
#CAST R2,MAX=10 #CASE 1,3,5,7 : * Code to process if R2 contains 1, 3, 5, or 7 : #CASE 4,8 : * Code to process if R2 contains 4 or 8 : #CASE ERROR : * Code to process if R2 contains a negative value or a value greater than 10. : #ECAS
Related Macros