Arbortext IsoDraw > Macro Language Reference > Functions and Data Types > Functions > Call
  
Call
Applies to Arbortext IsoDraw 7.0 F000 and later.
The call() function calls a subMacro as a function. The subMacro has to have a RETURN directive to close and pass back a value to the calling macro.
call()
callmacrocall
macrocall
(string) Name of the macro or subMacro to be called. The parameter list can be added in () parentheses. The name must correspond to a macro or subMacro in memory.
RETURN value
The type is determined by the calling macro or subMacro.
SUBMACRO Foobar( integer p1, integer p2 )
DEFINE r AS integer
# ...
RETURN r
END SUBMACRO

MACRO MyMainMacro
DEFINE result AS integer
# ...
# SubMacro-call with "Run" command:
result = RUN Foobar(a,b)
# ...
# The same, using the "call"-Function:
result = call("Foobar(a,b)")
# ...
# The following is not possible with "Run":
s = GET STRING "Please enter Macro name"
result = call( s+"(a,b)" )
# ...
END MACRO