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.

The following code uses the whatis() function to determine whether or not avalue has been assigned to the PRINTER variable:3.FOURC> if ((whatis("PRINTER")>>16)&0x0800) {4.more> printf("Warning: No open printer.\n")5.more> open(PRINTER = "/dev/null")6.more> }7.FOURC>whatis(string, 1)— With two arguments, returns a printable string explaining inwords what kind of thing the thing named in string is to <strong>spec</strong>.sleep(t) — Suspends execution for a minimum of t seconds, where t may be nonintegral.Actual sleep times may vary depending on other activity on the systemand the resolution of the system clock. Returns true. Can be interruptedwith ˆC . Fractional-second sleeps are available on all currently supported systems,although on on the System V/386 UNIX systems, such sleeps are availableonly if the <strong>spec</strong>ial nap driver has been installed.<strong>spec</strong>_par(par [, value ]) — Sets internal parameters. Typing <strong>spec</strong>_par("?") liststhe available parameters. The currently available parameters are:"auto_file_close" — The auto-file-close option is available to automaticallyclose output files that haven’t been accessed for some interval of time.The parameter units are hours, and the parameter can have nonintegralvalues. When the auto-close option is enabled, each time an on() ,off() , open() , close() or fprintf() function is called, <strong>spec</strong> willcheck its list of opened output files. Any files which have not been writtento for the length of time given by value hours will be closed.Enabling this option can help prevent errors when your macros or commandsdo not close files when appropriate, resulting in <strong>spec</strong> runningout of resources to open additional files.As files are opened automatically when sent output, auto-close modeoperates transparently for the most part. However, ifyou change to adifferent working directory between the time the file is first opened andsubsequently automatically closed, and if the file is not opened by anabsolute path name, the next time you refer to the file, <strong>spec</strong> will reopenit using a relative path based on the current directory.If value is zero, the mode is disabled. By default, the mode is initiallydisabled."auto_hdw_poll" — When automatic hardware polling is turned on, <strong>spec</strong> willautomatically poll busy motor controllers, timers and acquisition devicesto determine when they are finished. For interrupt-driven devices (certainmotor controllers and timers), this mode is irrelevant. For some76 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!