WOLFRAM SYSTEM MODELER
This information is part of the Modelica Standard Library maintained by the Modelica Association.
number = Strings.scanReal(string); (number, nextIndex) = Strings.scanReal(string, startIndex=1, unsigned=false, message="");
The first form, "scanReal(string)", scans "string" for a Real number with leading white space and returns the value.
The second form, "scanReal(string,startIndex,unsigned)", scans the string starting at index "startIndex", checks whether the next token is a Real literal and returns its value as a Real number, as well as the index directly after the Real number. If the optional argument "unsigned" is true, the real number shall not have a leading "+" or "-" sign.
If the required Real number with leading white space is not present in "string", an assert is triggered.
Description: String to be scanned
Default Value: 1
Description: Start scanning of string at character startIndex
Default Value: false
Description: = true, if Real token shall not start with a sign
Default Value: ""
Description: Message used in error message if scan is not successful
Description: Value of real number
Description: index of character after the found number