Skip to main content

MacroInfo

MacroInfo (macroNameStr)

The MacroInfo function returns a keyword-value pair list of information about the named macro.

Parameters

macroNameStr is a string expression containing the name of a Macro, Proc, or Window procedure.

macroNameStr can also be "" to return information about the currently running macro.

Details

The returned string contains several groups of information. Each group is prefaced by a keyword and colon, and terminated with the semicolon. Use StringByKey and NumberByKey to extract the values that follow the keywords. The keywords are as follows:

KeywordInformation Following Keyword
KIND"Proc", "Macro", or "Window", depending on how the procedure is defined.
NAMEThe name of the macro. Same as contents of macroNameStr in most cases.
N_PARAMSNumber of parameters for the macro.
PARAM_n_TYPENumber encoding the type of each parameter. There will be N of these keywords, one for each parameter. The part shown as n will be a number from 0 to N-1.
PROCLINELine number within the procedure window of the macro definition.
PROCWINTitle of procedure window containing the macro definition.
SUBTYPEThe procedure subtype, for instance GraphStyle. See Procedure Subtype Keywords for others.

PARAM_n_TYPE Codes

TypeCodeCode in Hex
Variable40x4
Variable/C50x5
String81920x2000

Example

Proc MyGraphStyle() : GraphStyle
String info = MacroInfo("")
String myName = StringByKey("NAME", info)
ModifyGraph/Z standoff=0
End

See Also

FunctionInfo, FunctionList, MacroList, NumberByKey, StringByKey.

For details on procedure subtypes, see Procedure Subtypes, Button, CheckBox, PopupMenu, SetVariable.