11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

To provide device independence for a program that can run on multiple platforms, use theSET command at the start of the program to assign the necessary escape sequences to variables.In your program code, you can then reference the variables instead of the actual escapesequences. To adapt the program for a different platform, simply make the necessary changesto the escape sequences defined with the SET command.Device Controls<strong>Caché</strong> supports the use of negative integer expressions as device controls. For example, inVMS, the following command rewinds and unloads the tape on the current magnetic tapedevice.WRITE *-13The following sections describe these controls for terminal and magnetic tape devices.Terminal Devices<strong>Caché</strong> implementations support the *-1 control for terminal devices. This control clears theinput buffer of any characters that have not been input by previous READ commands.An input buffer holds characters as they arrive from the keyboard, even those the user typesbefore the routine executes a READ command. In this way, the user can answer questionseven before they appear on the screen. When the READ command takes characters from thebuffer, <strong>Caché</strong> echoes them to the terminal so that questions and answers appear together.When a routine detects errors it may cancel these answers. For further details, see TerminalI/O in the <strong>Caché</strong> I/O Device Guide.Magnetic Tape DevicesWRITE<strong>Caché</strong> platforms support a number of controls for magnetic tape devices. The following tablelists these controls and their functions. For further details, see Magnetic Tape I/O in the <strong>Caché</strong>I/O Device Guide.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 169

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

Saved successfully!

Ooh no, something went wrong!