VARKON Version 1.15 1997-10-24
add_mbs - Function
Adds a statement
Description
Adds an entity defined by a MBS statement. The result is a new statement linked to the end of the active module.
add_mbs() automatically generates the identity to use for the new entity and uses this together with name and parameters to create a line of text (MBS syntax) that defines the new entity. The line of text is then sent to the MBS compiler and the result linked to the active module.
Syntax
add_mbs(name, par1, par2, .....)
STRING name*31; STRING par1*132; STRING par2*132 . .
The number of parameters actually specified depends on the name of the MBS-procedure to use.
Principal parameters
name - Name of MBS procedure par1 - First parameter
Optional parameters
par2 - Second parameter . .
Any number of parameters may be passed.
Return value
A REF holding the identity of the new entity.
Examples
poi_id:=add_mbs("poi_free", "vec(100,100)");
Adds a poi_free() statement to the active module.
text_id:=add_mbs("text", "vec(25,25)", "0", chr(34)+"ABC"+chr(34));
Adds a text() statement. Note the double quoting of ABC, chr(34) is just another way to write a quote.
part_id:=add_mbs("part", part_name, par1, par2);
Adds a part() statement.