Skip to content

JumpTo

control category: control-flow no `||` resultSize: 1

Unconditionally jumps to a named Mark later in the rule chain.

JumpTo skips the remaining rules between itself and the named Mark. It accepts no input and produces no output — it must appear as a standalone statement in the chain (no :field => JumpTo(...) form).

Typical use: closing the "true" branch of a JumpIfNot if/else so control falls through past the "else" branch.

Parameters

1mark Mandatory — accepts: STRING

The name of the destination Mark to jump to.

Input type

Output type

No output — JumpTo is a standalone control statement.

Requires

  • No pipeline input or output is allowed.
  • The destination Mark must exist in the same chain.

Examples

Skip the default branch of an if/else

:visit_concept => JumpIfNot(9202, "Default") => :visit_concept
// ...processing for the matching case...
JumpTo("Done")
Mark("Default")
// ...default-branch processing...
Mark("Done")

Errors

  • JumpTo: No named input or output are allowed
    A :field => JumpTo(...) or JumpTo(...) => :field form was attempted.
  • JumpTo accepts a single STRING that defines the mark to jump to
    Wrong number of parameters or non-string parameter.

See also

JumpIf, JumpIfNot, Mark