Flow Control

Traditional procedural programming languages typically require programmers to define an explicit "flow of control" at every stage in their programs. The Wolfram Language provides standard flow control primitives, with various symbolic extensions—though its higher-level programming paradigm usually frees programmers from having to specify the details of flow control.

(RefLink[Return, paclet:ref/Return]) — return from any function

(RefLink[Break, paclet:ref/Break]), (RefLink[Continue, paclet:ref/Continue]) — break, continue in procedural looping constructs

(RefLink[Goto, paclet:ref/Goto]), (RefLink[Label, paclet:ref/Label]) — largely obsolete explicit procedural flow control

(RefLink[Throw, paclet:ref/Throw]) — "throw" any expression to be "caught" by an enclosing (RefLink[Catch, paclet:ref/Catch])

(RefLink[Check, paclet:ref/Check]) — check for messages

(RefLink[Abort, paclet:ref/Abort]) — generate an abort

(RefLink[TimeConstrained, paclet:ref/TimeConstrained]), (RefLink[MemoryConstrained, paclet:ref/MemoryConstrained]) — run with constraints

(RefLink[Pause, paclet:ref/Pause]) — pause for a specified time

(RefLink[Dialog, paclet:ref/Dialog]) — initiate a subsession dialog