diff --git a/doc/manual/source/the-model-file.rst b/doc/manual/source/the-model-file.rst index 7645944a8..d07adff17 100644 --- a/doc/manual/source/the-model-file.rst +++ b/doc/manual/source/the-model-file.rst @@ -10482,6 +10482,23 @@ directive (see below). A function is evaluated at the time it is invoked, not at define time. Functions can be included in expressions and the operators that can be combined with them depend on their return type. +.. rubric:: Checking variable type + +Given a variable name or literal, you can check the type it evaluates to using +the following functions: ``isboolean``, ``isreal``, ``isstring``, ``istuple``, +and ``isarray``. + + *Examples* + ++---------------------+------------+ +| **Code** | **Output** | ++=====================+============+ +| ``isboolean(0)`` | ``false`` | ++---------------------+------------+ +| ``isboolean(true)`` | ``true`` | ++---------------------+------------+ +| ``isreal("str")`` | ``false`` | ++---------------------+------------+ .. rubric:: Casting between types diff --git a/preprocessor b/preprocessor index ff6eea7f2..273c54f7f 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit ff6eea7f297cdceab7b8c2fd954d7332bb86e04f +Subproject commit 273c54f7fbd9a8f345e33300e25ea5fb45b2b3c8