- Function me::Create(name, newType, parentId, pos)
me::Create
The function me::Create creates a runtime identifier.
me::Create(
name, ! (input) a string
newType, ! (input) an element
parentId, ! (input) an element
pos ! (optional) an integer
)
Arguments
- name
A string that is valid name for a runtime identifier.
- newType
An element in the set
AllIdentifierTypes.- parentId
An element in the set
AllSymbolsreferencing a runtime identifier.- pos
1 is the first position, and 0 means “place at end”, the default is 0.
Return Value
Returns an element in
AllSymbolsif successful or the empty element otherwise. In the latter case error(s) have been raised. WhenruntimeIddoesn’t reference a runtime identifier an error will be raised.
Example
Viewing a small runtime library with prefix frerl in the model explorer:
Let ep_functionReferenceExampleRuntimeDeclSec have value frerl::runtime_declaration_identifiers, then the code:
me::Create(
name : "v_x",
newType : 'variable',
parentId : ep_functionReferenceExampleRuntimeDeclSec,
pos : 0);
inserts a variable at the end of the declaration section, thus changing that library to the following:
illustrating that a runtime library can grow at runtime.
See also
Generic references for model edit functions can be found on the index page.