syntaxError

Print an error message, a string and the index at which scanning detected an error

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Syntax

Strings.syntaxError(string, index, message);

Description

Function syntaxError prints an error message in the following form:

Syntax error at column <index> of
<string>
    ^       // shows character that is wrong
<message>

where the strings within <..> are the actual values of the input arguments of the function.

If the given string is too long, only a relevant part of the string is printed.

Syntax

syntaxError(string, index, message)

Inputs (3)

string

Type: String

Description: String that has an error at position index

index

Type: Integer

Description: Index of string at which scanning detected an error

message

Default Value: ""

Type: String

Description: String printed at end of error message