Caché MultiValue Basic Reference
@ (at sign)
 [Next]
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Sets screen cursor position or screen display option.
Synopsis
@(x[,y])

@(code[,arg])
Arguments
x An expression that resolves to a positive integer specifying the number of columns to indent the horizontal position of the screen cursor. 0=column 1 (no indent), 1=indent 1 column.
y Optional — An expression that resolves to a positive integer specifying the vertical line position of the screen cursor. 0=top of screen. If omitted, defaults to the current line.
code An expression that resolves to a negative integer specifying a screen display option code.
arg Optional — An expression that resolves to an integer argument required by certain code values.
Description
The @ function has two forms. If the first argument is a positive integer or zero, it sets the cursor position. If the first argument is a negative integer, it sets a screen display option.
Cursor Positioning
The @ function (with a positive first argument) changes the horizontal and/or vertical position of the screen cursor. To change only the horizontal position, specify @(x). To change only the vertical position, specify @(0,y).
The @ function does not change the Caché ObjectScript $X and $Y special variables.
Screen Display Options
The @ function (with a negative first argument) changes a screen display option. The following code options are supported:
-1 Clear screen and position cursor at home location (top left). For wyse terminals, -1 clears the screen, except for protected fields.
-2 Position cursor at home location (top left).
-3 Clear the screen from the current cursor position to the end of the screen.
-4 Clear the screen from the current cursor position to the end of the line.
-5 Start blinking text.
-6 Stop blinking text.
-7 Start protected field. (See -62)
-8 End protected field. (See -62)
-9 Back space. You can supply an optional 2nd argument specifying the number of backspaces to perform. The default is 1 backspace.
-10 Back line. Moves up a line without resetting cursor column. You can supply an optional 2nd argument specifying the number of lines to go back. The default is to go back one line (go to the previous line).
-13 Start reverse video. This displays white characters on a black background.
-14 Stop reverse video.
-15 Start underlining.
-16 Stop underlining.
-17 Insert line. Moves up a line and resets cursor to column 1. You can supply an optional 2nd argument specifying the number of lines to insert.
-18 Delete line. Resets cursor to column 1.
-20 Set insert (overtype) mode.
-21 Reset insert mode to normal mode (the default).
-23 Disable keyboard input and screen display.
-24 Reenable keyboard input and screen display (the default).
-29 Use 80–column line width (the default).
-30 Use 132–column line width.
-31 Turn off blinking cursor position indicator.
-32 Turn on blinking cursor position indicator (the default).
-34 Move cursor forward (insert blank space). You can supply an optional 2nd argument specifying the number of spaces to advance the cursor. 0 or 1 both advance the cursor 1 space. The default is to advance the cursor 1 space.
-37 Set foreground (text) color. You can supply an optional 2nd argument specifying the color, as follows: 0=black, 1=red, 2=green, 3=yellow, 4=blue, 5=magenta, 6=turquoise, 7=white, 8=no change, 9=black. Higher numbers have no effect. The default is red. The blinking cursor remains black.
-38 Set background color. You can supply an optional 2nd argument specifying the color, as follows: 0=black, 1=red, 2=green, 3=yellow, 4=blue, 5=magenta, 6=turquoise, 7=white, 8=no change, 9=white. Higher numbers have no effect. The default is red. The blinking cursor changes to a contrast color to the background color.
-42 Disable keyboard input.
-43 Reenable keyboard input (the default).
-50 Move cursor up (reverse line feed). You can supply an optional 2nd argument specifying the number of lines to move up. The default is 1.
-56 Enables arrow keys / numeric keypad (the default). Arrow keys can be used to move the cursor left and right within the command line, or to retrieve previous command lines.
-57 Disables arrow keys / numeric keypad. All arrow keys are equivalent to the Enter key.
-58 Start bold text.
-59 Stop bold text.
-62 Enable protected fields (see -7 and -8).
-63 Disable protected fields (see -7 and -8).
-108 Sounds the bell.
Emulation
In D3 emulation, @(-11) enables protected fields and @(-12) disables protected fields. D3 also supports @(-57) through @(-64).
In jBASE and Reality emulation, @(-128) through @(-191) are supported. Start blinking text with -131, -138, -139, -142, or -143. Start reverse text with -140 or -141. Start underline text with -144, -145, -152, or -153. Start bold text with -160 or -161. Start blink/underline with -146, -147, -150, -151, -154, -155, -158, or -159. Start reverse/underline with -148, -149, -156, or -157. Start blink/bold with -162, -163, or -166. You can use -137 to turn off any combination of bold, blinking, reverse, or underline text.
In MVBase emulation, @(-57) through @(-64) are used for dimmed foreground colors.
In Ultimate emulation, @(-1) Clear screen; @(-2) Cursor home; @(-3) Clear to end of screen; @(-4) Clear to end of line; @(-5) Blink on; @(-6) Blink off; @(-7) Protected field on; @(-8) Protected field off; @(-9) Cursor left; @(-10) Cursor up; @(-11) Cursor down; @(-12) Cursor right; @(-13) Printer on; @(-14) Printer off; @(-15) Printer on (enable slave port in transparent mode); @(-16) Printer on (initiate slave local print); @(-17) Underline on; @(-18) Underline off; @(-19) Reverse on; @(-20) Reverse off; @(-21) Delete line; @(-22) Insert line; @(-23) Scroll up; @(-24) Bold on; @(-25) Bold off; @(-26) Delete character; @(-27) Insert character; @(-28) Insert on; @(-29) Insert off; @(-33) 80 column screen; @(-34) 132 column screen; @(-50) Graphics on; @(-51) Graphics off; @(-52) Blink on; @(-53) Blink off; @(-54) Reverse on; @(-55) Reverse off; @(-58) Underline on; @(-59) Underline off; @(-66) Dim (half intensity) on; @(-67) Dim (half intensity) off; @(-80) Set 80 column mode; @(-82) Set 132 column mode; @(-108) sounds the bell.
In UniData emulation, @(-19) sounds the bell.