12.07.2015 Views

spec - Local Sector 7 web page

spec - Local Sector 7 web page

spec - Local Sector 7 web page

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BGLADNSICBuilt-InGlobal<strong>Local</strong>Associative arrayData arrayNumber typeString typeImmutable attributeConstant attributeCommands For MacrosBuilt-In Commandsdef name string — Defines a macro named name to be string . Each time nameoccurs on input, it is replaced with string . The definition is made immediately,sothe macro can be used later in the same statement block in which it isdefined and can be redefined within the same statement block.Note that the macro definition is made regardless of any surrounding flow controlstatements, since the enclosing mini-program is not yet completely parsedand is not executing.rdef name expression — Defines a macro named name to be expression ,which isalmost always a string constant. Each time name occurs on input, the valueexpression is substituted. Unlike def ,described above, the macro definitionis not made until all the encompassing statement blocks are parsed and theresulting mini-program is executed. Consider the following example.if (flag == 1)rdef plot "onp;offt;lp_plot;ont;plot_res;offp"else if (flag == 2)rdef plot "splot;onp;offt;lp_plot;plot_res;ont;offp"else if (flag == 3)rdef plot "onp;plot_res;offp"elserdef plot ""Clearly, itisnecessary for the mini-program to be parsed and executed todecide which is the appropriate definition to assign to the plot macro.prdef — Displays all macro definitions. The displayed definitions are prependedwith def name ´ and terminated with ´ so if saved to a file, the definitions canbe read back. (See the standard macro savmac on <strong>page</strong> 132.)90 REFERENCE MANUAL INTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!