mustBeVector

Checks that value is vector or raise an error.

Syntax

  • mustBeVector(var)

  • mustBeVector(var, 'allow-all-empties')

  • mustBeVector(var, argPosition)

  • mustBeVector(var, 'allow-all-empties', argPosition)

  • C++: void mustBeVector(const ArrayOfVector& args, bool allowsAllEmpties, int argPosition)

Input argument

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

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

Description

mustBeVector checks that value is vector or raise an error.

Example

mustBeVector(true)
mustBeVector([1 2])
mustBeVector([])
mustBeVector([], 'allows-all-empties')

See also

isvector.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated