macro Command

Searches the LPATH for a macro file, then processes it.

Syntax

Parameters

Filename 
Name of the macro to invoke. If the macro is not in the current directory or in a directory listed in the LPATH4 or CPPLPATH4 environment variables, then specify a full path name. If no extension is supplied then .LX (upper case) is added to the name.
Parameter 
The parameter string to be passed to the macro.

Description

The macro command searches for a file and invokes it as a macro. It invokes simple macros (files containing only comments and Editor commands ) by passing each line of the file to the Editor for processing. When MACRO is set to BUILTIN, the Parameter string is not processed. You can view the MACRO type using the environment command.

Example

To invoke a macro called newkeys, type:

macro newkeys 

The Editor searches for a file called newkeys.LX and processes each line of the file as either a command or a comment.

API Return Codes

-1 
The file specified as a macro was not found. Check that the file name is correct and is preceded by the correct path name. Use the Open dialog or relevant commands to try to locate the file to make sure it exists.
-3 
No Filename was specified. Issue the command again with a valid file name. Specify a path name if necessary.
-4 
The Editor expects the first line of the macro file to be a comment ( and starting with /*), but it is not. First make sure that you have called the correct file. If the file is correct, edit the file to include a comment on the first line.