Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

goto

The goto instruction unconditionally branches to a label.

Synopsis

goto(label)

Description

The goto instruction is an unconditional jump to the instruction indicated by the label.

Example

In the following example, the goto instruction implements if-then logic to avoid the fall-through condition. As shown in the first block of code, the instruction jumps to no_value if true, but must avoid that block of code if false. A goto instruction is also used as a direct path out of a block of code.

jmp(r.1 <= 0, no_value)
talk("the value is positive")
goto(next_block)

no_value:
talk("the value is not positive")
.......... ................... ..............

next_block:
........ ..................

See also

© 2006 Avaya Inc. All Rights Reserved.