Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mustBeFloat

Checks that value is floating-point or raise an error.

Syntax

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

Input argument

  • var - a variable: all supported types and classes that implement isfloat method.
  • argPosition - a positive integer value: Position of input argument.

Description

mustBeFloat checks that value is floating-point (single or double) or raise an error.

Example

mustBeFloat(true)
mustBeFloat([])
mustBeFloat(single([true false]))

See also

isfloat.

History

VersionDescription
1.0.0initial version

Author

Allan CORNET