Jump to start of loop

Command group Flag affected Reversible Execute on client Platform(s)
Constructs NO NO YES All

Syntax

Jump to start of loop

Description

This command jumps to the Until or While command at the beginning of the current loop, missing out all commands after the jump. When used in a While–End While loop, Jump to start of loop jumps to the start of the loop so that Omnis can make the While test; the loop continues or terminates depending on the result of this test, whereas, Break to end of loop automatically terminates the loop regardless of the value of the condition. Placing a Jump outside a loop causes an error.

Example

# Only calculate lBalance if an account number has been entered
Calculate lBalance as 0
Repeat

  Prompt for input Account Number Returns lAccountNumber (Cancel button)
  If flag false ## cancel button
    Break to end of loop
  Else If len(lAccountNumber)=0 ## no account number entered
    OK message {Please enter an account number}
    Jump to start of loop

  End If
  Calculate lBalance as 100

Until lBalance>0