bdfs1m0yStructured Programming Macros

#GOTO Macro Group

Use this macro group to pass control to another section of code.

The #GOTO macro group includes the following macros:

See #GOTO Macro Group Processing for a diagram that shows the processing flow of the #GOTO macro group.

Format







#GOTO
generates a branch to the code starting with a corresponding #LOCA macro.

name
is a name assigned to the section of code associated with the #LOCA macro.

IF
specifies when to take the branch condition based on a conditional expression. See Conditional Expression Format for information about the syntax of a conditional expression.

PREFIX=label
specifies a prefix for all link labels generated by this macro group, where label is a 4-character alphabetic name.

#LOCA
specifies the start of the code for processing.

Entry Requirements

None.

Return Conditions

Programming Considerations

Examples

In the following example, a conditional expression is used to control the exit processing.

         #GOTO   XSR1ERR1,IF,(LTR,R0,R0,Z)
          :
*    Code to process if R0 is not zero (the condition is false).
          :
 
         #LOCA   XSR1ERR1
          :
*    Code to process if R0 is zero (the condition is true).
          :
 

Related Macros

#EXEC-Execute Macro.