Arbortext IsoDraw > Macro Language Reference > Introduction > Language Basics > Flow Control Statements > Return
  
Return
Using the RETURN statement inside a subMacro returns the given value as a result to the calling macro.
RETURNexpression
expression
Expression to return to calling macro.
SUBMACRO FindPageFormat
DEFINE s AS string
DEFINE p AS Point
p.x = activeDoc.window.pageX
p.y = activeDoc.window.pageY
IF ( p.x > p.y )
IF (p.x > p.y )
s - "landscape"
ELSE
s = "portrait"
END IF
RETURN s
END SUBMACRO

MACRO GetPageFormat
DEFINE format AS string
format = RUN FindPageFormat
MESSAGE "The page is in the " + format + " format"
END MACRO