Comments
In SML source code comments can be inserted to:
- Document the text (author, date, and so on)
- Provide general description of a modeling task
- Remove temporary text lines.
Twin Builder supports two types of comments:
- Single Line Comments: Text after a double slash "//" is interpreted as comment up to the line end.
- Multi-Line Comments: The symbols "/*" and "*/" separate comments from the other text. All characters within these marks are ignored by the simulator.
Example:
SMLDEF MacroRC
{
/* electrical pins */
PORT ELECTRICAL : N1;
PORT ELECTRICAL : N2;
/* parameter pins */
PORT REAL in RESISTANCE[Ohm] : ValueR = 1k; // value of the
resistance
PORT REAL in CAPACITANCE[F] : ValueC = 1u; // value of the
capacitance
/* Output values - unused
PORT REAL out : VR = R1.V;
PORT REAL out : VC = C1.V;
*/
INTERN R R1 N1:=N2, N2:=GND ( R := ValueR ) ;
INTERN C C1 N1:=N2, N2:=N1 ( C := ValueC ) ;
}