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

mustBeA

Checks that input value comes from one of specified classes.

Syntax

  • mustBeA(var, classNames)
  • mustBeA(var, classNames, argPosition)
  • C++: void mustBeA(const ArrayOfVector& args, const wstringVector &classNames, int argPosition)

Input argument

  • var - a variable.
  • classNames - a variable: name of data type or class.
  • argPosition - a positive integer value: Position of input argument.

Description

mustBeA checks that input value comes from one of specified classes.

Example

mustBeA(1, 'double')
mustBeA([], ["double", "single"])

See also

mustBeNumeric.

History

VersionDescription
1.0.0initial version

Author

Allan CORNET