Previous Topic: KEY and ENTER CommandsNext Topic: Exercise


BRANCH Statement

So far you have seen two examples of how the BRANCH statement can be used to redirect the flow of an ACL/E program. For a sample of a program that compares two accumulators to determine whether branching should occur, see A Program That Repeats a String. In the first BRANCH statement in this program, a string is compared with data on the screen to determine whether branching should occur.

The ANY value allows the BRANCH statements to tell the program to go to the specified label no matter what is going on at that point. In the following BRANCH statement, the label name is DONE. Branch statements with a value of ANY are called unconditional BRANCH statements. Unconditional BRANCH statements are analogous to GOTO statements in other programming languages in that they are used chiefly to go around other statements.

BRANCH ANY,DONE