The values of built-in parameters can be written according to the following conventions:
Escape sequence | Description |
![]() |
bell |
![]() |
backspace |
![]() |
form feed |
![]() |
newline |
![]() |
carriage return |
![]() |
horizontal tab |
![]() |
vertical tab |
![]() |
backslash |
![]() |
double quote |
![]() |
ASCII code given by a hexadecimal number nn |
![]() |
ASCII code given by an octal number ooo |
In Example 3.6 some typical applications of MdlString parameters are presented.
Parameter<MdlString> message = "Hello World!n";
Parameter<MdlString> mydir = $HOME + "/mydir";
Parameter<MdlString> ringbell = "a
a";
Example 3.6: MdlString Parameters and literals
The values of user defined parameter types
(Section 2.3.1.1) have to be surrounded by a double
pair of '{{'
and '}}'
braces to protect them from being
interpreted by the MDL interpreter. The text within these brace pairs is
forwarded to the scan method of the C++ class describing the
value of the Parameter.
In Example 3.7 which is an excerpt of a PROMIS-NT model class used for the definition of new quantities, the PromisQuantity {{ B active }} is assigned to the associative list quantity of the type PromisQuantityList. The key is of the type MdlString with the value "B_act". Therefore the C++ class PromisQuantity has to implement a public method scan which parses the string `` B active ''.
// definition of a new Quantity
:quantity["B_act"] = {{ B active }};
Example 3.7: Literal notation of user defined Parameter types