Calling a 3B2 macro from perl with 'q' or 'qq'
ArborX


Summary
Calling a 3B2 macro from perl with 'q' or 'qq'.

The macro function takes a single string which is passed to the Arbortext APP processor for execution.  Therefore, when calling a Arbortext APP macro that refers to information in double quote delimiters, (like tf "times" for example) it is convenient to use the macro function with Perl's 'q' or 'qq' operators.  Use 'qq' to interpolate embedded variables or 'q' otherwise.

The example below calls the Arbortext APP insert (@) macro and inserts the text 'Insert this Text' at the current cursor position.

 macro q(@Insert this Text);

This example uses the Arbortext APP ttagmk command to create a new text stream called 'new'.

 macro q(ttagmk 'new.tx');

If the function involves using a variable, use the 'qq' function to interpolate embedded variables.  For instance this syntax makes a tag with the value of the variable called tagname:

 qq(ttagmk '$tagname');

Document created on 01-May-2003 (revision 1)