functionloadString
Loads Modelica definitions from a string.
Information
Parses the data and merges the resulting AST with the loaded AST. If a filename is given, it is used to provide error messages as if the string was read from a file with the same name.
When merge is true the classes cNew in the file will be merged with the already loaded classes cOld in the following way:
- get all the inner class definitions from cOld that were loaded from a different file than itself
- append all elements from step 1 to class cNew public list
NOTE: Encoding is deprecated as *ALL* strings are now UTF-8 encoded.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | data | ||
| String | filename | "<interactive>" | |
| String | encoding | "UTF-8" | Deprecated as *ALL* strings are now UTF-8 encoded |
| Boolean | merge | false | if merge is true the parsed AST is merged with the existing AST, default to false which means that is replaced, not merged |
| Boolean | uses | true | |
| Boolean | notify | true | Give a notification of the libraries and versions that were loaded |
| Boolean | requireExactVersion | false | If the version is required to be exact, if there is a uses Modelica(version="3.2"), Modelica 3.2.1 will not match it. |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | success |