c0de 0.3.0This page in English

Diese Seite ist noch nicht übersetzt. Sie wird auf Englisch angezeigt.

VAL ​

Converts a text to a number.

isInteger is true if the text is a whole number. Use FIX to turn the value into an INTEGER then. A text that is not a number raises INVALID_ARGUMENT.

Parameters and results

  • text STRING: the text, e.g. "42" or "3.5"
  • result value FLOAT: the number
  • result isInteger BOOLEAN: true if the text is a whole number

Example

c0de
CALL c0de/strings/VAL
    PARAMETER text input ;
    RESULT value number
    RESULT isInteger whole