INPUT /  OUTPUT /  LANGUAGE





invalid tag

Transient logic tag

Generates or tests for the value invalid.

Sample usage

<invalid> — generates the value invalid.

<invalid asdfjklasdfzxcv> — Tests the contents of the primary field and generates true since asdfjklasdfzxcv evaluates to invalid. (In this case it is not defined in the document.)

Fields

Primary field

Vector field

Optional. The primary field may contain one or more values to test against.

Behaviour

invalid is generated wherever a value can't be worked out, for example from a name that doesn't exist (which also writes an error message to the terminal), or from impossible arithmetic.

The invalid tag, when used without any field values, expresses the literal value invalid anywhere it is required.

When at least one primary field value is specified, the tag tests whether the value(s) are exactly the value invalid.

Testing for invalid is often useful for validating a result generated with unreliable user input before it is passed back to the running program.

See also