JumpIf¶
Jumps to a named Mark when the input value equals the given parameter.
JumpIf is part of the imperative control-flow cluster. It accepts a
single pipeline input and compares it against a literal value. When the
comparison succeeds, execution skips ahead to the Mark(...) rule with
the matching name; otherwise the chain continues normally. The input
value is passed through unchanged regardless of whether the jump fires.
Use it to short-circuit branches that do not need further processing — e.g. when a default has already been chosen and downstream lookups are unnecessary.
Parameters¶
- 1 —
valueMandatory — accepts: BOOLEAN, DATE, FLOAT, INT, STRING, NULL -
The literal compared against the input value. Its type must match the input's type (or be
NULL). - 2 —
markMandatory — accepts: STRING -
The name of the destination
Markto jump to.
Input type¶
BOOLEANDATEFLOATINTSTRING
Output type¶
same-as-input
The input value is passed through unchanged.
Requires¶
- Exactly one pipeline input.
- Parameter type must match the input type (or be NULL).
- The destination
Markmust exist in the same chain.
Examples¶
Jump past default branch when concept already resolved
Used together with JumpTo and Mark to form an if/else (see test053).
Errors¶
-
JumpIf got too many inputs- More than one value reached the rule.
JumpIfaccepts a single input.
-
JumpIf accepts input of types: INTEGER, STRING, FLOAT, DATE, or BOOLEAN- An unsupported input type (e.g. ARRAY) was supplied.
-
JumpIf requires the type of the input and the type of the parameter to be identical- The literal value's type does not match the input field's declared type.