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.

38.FOURC> undef com39.FOURC> prdef comcom: undefined.40.FOURC>There are several <strong>spec</strong>ial macro names. If a macro named cleanup is defined, it willbe automatically invoked whenever there is an error or ˆC interrupt. This macro canbe defined to print a message, update a file, return motors to a starting position, etc.For example, in the standard macro library, something like the following is definedfor the duration of a scan:def cleanup ’comment "Scan aborted after %g points." NPTSundef cleanup’Similarly, amacro named cleanup1 can be defined, which behaves the same way.However,ifcleanup exists, it will be run first.Also begin_mac , end_mac and prompt_mac have <strong>spec</strong>ial meaning. (text forthcoming...)Command FilesMacros are generally defined and maintained using the command file facility. Inaddition, sequences of experimental scans are often called up using command files.Command files are ASCII files of text, created with any of the UNIX text editors, andcontain input just as it would be typed interactively. Command files are read line byline by <strong>spec</strong> when invoked with the functions dofile() or qdofile() .For example,40.FOURC> dofile("<strong>spec</strong>.mac")Opened command file ‘<strong>spec</strong>.mac’ at level 1.FOURC.1> (Commands from file echoed as read ...)The .1 extension to the prompt indicates the level of nesting. Command files can benested to five levels.The function qdofile() is identical to the function dofile() except that the commandsare not echoed as they are read.40.FOURC> qdofile("<strong>spec</strong>.mac")Opened command file ‘<strong>spec</strong>.mac’ at level 1.41.FOURC>INTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION USER MANUAL AND TUTORIALS 25

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

Saved successfully!

Ooh no, something went wrong!