mustBeLogical

Checks that value is logical or raise an error.

Syntax

  • mustBeLogical(var)

  • mustBeLogical(var, argPosition)

  • C++: void mustBeLogical(const ArrayOfVector& args, int argPosition)

Input argument

  • var - a variable: all supported types and classes that implement islogical and isempty methods.

  • argPosition - a positive integer value: Position of input argument.

Description

mustBeLogical checks that value is logical or raise an error.

Empty values are ignored.

Example

mustBeLogical(true)
mustBeLogical([])
mustBeLogical([true false])

See also

isempty, islogical.

History

Author

Allan CORNET

Last updated