mustBeNumeric

Checks that value is numeric or raise an error.

Syntax

  • mustBeNumeric(var)

  • mustBeNumeric(var, argPosition)

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

Input argument

  • var - a variable: all supported types and classes that implement isnumeric method.

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

Description

mustBeNumeric checks that value is numeric or raise an error.

Empty values are ignored.

Example

mustBeNumeric(1)
mustBeNumeric([])
mustBeNumeric({1})

See also

isnumeric.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated