Defining Macros from the Tools Pull-down Menu


There are a variety of methods to define macros during a DADiSP session. To define a macro from the Tools pull-down menu, follow these steps:


  1. Type the name of the macro you want to define, and click OK.

  2. A blank line will appear in the line editor.

  3. Select Tools, Macros, List Macro.

  4. Type the macro name, argument(s), some spaces, and then the macro expansion. Press return.



Define a macro, SQUAREVAL, which accepts an argument and returns the square of the input value.

Select Tools, Macros, Edit Macro, and a dialog box appears:




Type the macro name, SQUAREVAL, into the dialog box, and click OK.

A blank line appears at the line editor, type the following and hit return:


 SQUAREVAL(a) (a)^2


The macro SQUAREVAL is defined. To use the macro, type:




After pressing return, the value 100 is echoed at the bottom of the screen.




returns a series where each point in Window 1 is multiplied by itself.