next up previous contents
Next: 3.7 Immediate MDL Class Instantiation Up: 3. The Model Definition Previous: 3.5 Linkage of MDL Class


3.6 Prefixing Model Class Names for MDL Input Decks

The environment variable MDLPREFIXSTRING can be used to define a certain prefix string which is applied to any MDL class name defined after its specification. It is possible to modify the MDLPREFIXSTRING several times while parsing an MDL file. Note that the value of this environment variable is only used for parsing the .mdl file. Changing the value of the environment variable MDLPREFIXSTRING after the MDL file is parsed does not affect the MDL definitions.

The definitions in Example 3.14 using the prefix string ``Mmp'' are equivalent to the definitions listed in Example 3.15 which do not use a prefix string statement.

\includegraphics[width=0.6cm]{figures/exaLeft.eps}

NewModel Test1 : Parent1 {
   Instance subModel1 = Sub1;
}
set $MDLPREFIXSTRING = "Mmp";
NewModel Test2 : Parent2 {
   Instance subModel2 = Sub2;
}

Example 3.14: Prefixing MDL class names

\includegraphics[width=0.6cm]{figures/exaLeft.eps}

NewModel Test1 : Parent1 {
   Instance subModel1 = Sub1;
}
NewModel MmpTest2 : MmpParent2 {
   Instance MmpsubModel2 = MmpSub2;
}

Example 3.15: Prefixing MDL class names manually


next up previous contents
Next: 3.7 Immediate MDL Class Instantiation Up: 3. The Model Definition Previous: 3.5 Linkage of MDL Class
Robert Mlekus
1999-11-14