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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ExitingA <strong>spec</strong> session is normally terminated by typing ˆD at the start of an input line. Asof release 3.01.04, the quit command will also terminate <strong>spec</strong>, but only when typeddirectly from the keyboard or when read from a command file. The quit commandcan’tbeincluded in a macro.As of release 4.02.04, if there is a macro named end_mac defined, it will be run afterthe ˆD or quit command.When exiting, <strong>spec</strong> saves the user’s state, and if any motors are moving, waits forthem to halt and then updates the settings file.If <strong>spec</strong> appears hung, typing the quit character (often ˆ\ )should terminate the program.If <strong>spec</strong> is waiting for unresponsive hardware to indicate it is finished with amove or a count, typing the quit or interrupt character again may be necessary.VariablesAvariable is brought into existence simply by using it. Variables assigned values atthe top level (outside of any curly-bracketed statement block) are automatically madeglobal. Otherwise, unless explicitly given global attributes, the scope of a variablelies only within the statement or statement block in which it occurs.The possible attributes of a variable are as follows:<strong>Local</strong>GlobalBuilt-inConstantImmutableAsymbol with scope only in the statement block in whichit appears.Asymbol with scope that carries across separate statementblocks. All built-in symbols are global.Asymbol that is compiled into <strong>spec</strong> and that cannot beremoved.Aglobal symbol that cannot have its value altered by ordinaryassignment. Such a symbol can only be changedusing the constant command.Certain built-in symbols and motor and counter mnemonicsfrom the hardware config file, which cannot have theirvalues altered.Variables can have string, number or array type and may have both string and numbertypes simultaneously. The print command always prints the string representationof a variable. The formatted printing commands printf , fprintf and sprintfINTERIM WORK-IN-PROGRESS (8/16/01) NOT FOR GENERAL DISTRIBUTION REFERENCE MANUAL 55

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

Saved successfully!

Ooh no, something went wrong!