Mnemonics "R"

From CometWiki

Revision as of 15:09, 22 August 2011 by Barb (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

(Radio Button Off)

 
Note: This feature is not supported beyond Comet 504. 
Mnemonic:   (Radio Button Off)  
Hex equivalent:  "@CBC7B7@"  
Discussion:  This mnemonic draws a graphical radio button on the screen. The radio button is in the "off" position, as shown here: 
 

The radio button symbol occupies 3 spaces on the screen. 

Note: The (Enhanced Characters On) mnemonic must be used before the (Radio Button Off) mnemonic us used. 

Also see (Radio Button On). 
 
Example:  a. 100 FORMAT (Radio Button Off)
   .
   PRINT (0,100)

b. PRINT (0) (Radio Button Off

(Radio Button On)

 
Note: This feature is not supported beyond Comet 504. 
Mnemonic:   (Radio Button On)  
Hex equivalent:  "@CBCFB7@"  
Discussion:  This mnemonic draws a graphical radio button on the screen. The radio button is in the "on" position, as shown here: 
 

The radio button symbol occupies 3 spaces on the screen. 

Note: The (Enhanced Characters On) mnemonic must be used before the (Radio Button On) mnemonic us used. 

Also see (Radio Button Off). 
 
Example:  a. 100 FORMAT (Radio Button On)
   .
   PRINT (0,100)

b. PRINT (0) (Radio Button On)

(RB)

 
Mnemonic:   (RB)  
Hex equivalent:  "@07@"  
Discussion:  Ring bell. 
The (RB) control code causes the video device to beep. 
 
Example:  a. 100 FORMAT (RB)
   .
   PRINT (0,100)

b. PRINT (0) (RB)

(RC)

 
Mnemonic:   (RC)  
Hex equivalent:  "@09@"  
Discussion:  Restore cursor position. 
The (RC) control code restores the cursor to its position at the beginning of the current write operation or at the location saved by the most recent "remember cursor" control code operation. See Remember Cursor (MC). 
 
Example:  a. 100 FORMAT (RC)
   .
   PRINT (0,100)

b. PRINT (0) (RC)

(RD)

 
Mnemonic:   (RD)  
Hex equivalent:  "@040B@"  
Discussion:  Roll down. 
The (RD) control code moves the entire screen display down one line, rolling the bottom line completely off the screen. It also inserts a blank foreground line at the top of the screen and moves the cursor to the beginning of the inserted blank line (i.e., the upper left corner of the screen). 

See Roll Up (RU). 
 
Example:  a. 100 FORMAT (RD)
   .
   PRINT (0,100)

b. PRINT (0) (RD)

(Read Mouse)

 
Mnemonic:   (Read Mouse)  
Hex equivalent:  "@0E0903@"  
Discussion:  This control reads the mouse data into the input buffer. 
See Reading the mouse for more information. 
 
Example:  a. 100 FORMAT (Read Mouse)
   .
   PRINT (0,100)

b. PRINT (0) (Read Mouse)

(Read Mouse)

 
Mnemonic:   (Read Mouse)  
Hex equivalent:  "@0E0903@"  
Discussion:  This control reads the mouse data into the input buffer. 
See Reading the mouse for more information. 
 
Example:  a. 100 FORMAT (Read Mouse)
   .
   PRINT (0,100)

b. PRINT (0) (Read Mouse)

(Rectangle)

 
Mnemonic:   (Rectangle = left, top, right, bottom)  
Discussion:  This mnemonic draws the rectangle specified by left, top, right, bottom using the currently selected pen and brush.  
History:  This mnemonic is valid in Comet98 and greater.  

(Redraw Notify)

 
Mnemonic:  (Redraw Notify=state)  
Discussion:  This mnemonic generates a "REDRAW" event (an EventSub event), which tells the program that the size of the window has changed (maximize/restore/font size change) so that it can be redrawn if required for example, if GDI features have been employed on the screen). 
The state parameter may contain the following values: 

1 = enable
2 = disable 
 
History:  This mnemonic was added in REL Version 02.04.  
Example:  Print (Redraw Notify=1)      ! enable redraw notify
.
.
.
EventSub EventHandler, A$, B$
Wait
.
.
.
EventHandler:

IF A$ = "REDRAW" THEN ...    ! size of window has changed

EventSub EventHandler, A$, B$
Return

Remember Cursor (MC)

 
Mnemonic:   (MC)  
Hex equivalent:  "@0401@"  
Discussion:  Remember cursor. 
The (MC) control code saves the current location of the cursor for subsequent use with the "restore cursor" control code. See Restore Cursor (RC). 
 
Example:  a. 100 FORMAT (MC)
   .
   PRINT (0,100)

b. PRINT (0) (MC)

This example shows how to use the remember cursor control code. When the PRINT statement is executed, the current position of the cursor will be saved by Comet. Subsequently, the cursor can be repositioned to this location with the (RC) control code.  

(RenameFile)

 
Mnemonic:  (RenameFile=filename-1,filename-2,flags)  
Discussion:  This mnemonic renames a Windows file. 
This mnemonic may be used by foreground programs only. 

Filename-1 is the name of the original file. Filename-2 is the name of the renamed file. Both file names are in Windows format, UNC format, or a directory alias. 

Flags is the sum of the specified decimal values from the following chart: 

Flag Description 
0 Perform function on the server, CometAnywhere or not. 
1 Perform function on the client, CometAnywhere or not.  
2 Perform function for CometAnywhere only and perform it on the client.  
 


After this mnemonic is issued, your program can issue an INPUT on LUN (0) to retrieve the error information. For example: 

  LENGTH 2 & LOCAL AX$,DX$
  LENGTH 254 & LOCAL RESULT$
  ResultFmt: FORMAT AX$;DX$;RESULT$
  .
  .
  Print (RenameFile=File1$,File2$,Flags)
  Input (0,ResultFmt)

The first field, AX$, contains the function error code, and the second field, DX$, contains the suberror code (aka the Windows file error code). Both of these fields are in Intel 2's complement format, and should be processed as follows: 
  AX$ = SUB(AX$,2,1) + SUB(AX$,1,1)   ! Flip the bytes around
  DX$ = SUB(DX$,2,1) + SUB(DX$,1,1)   ! Flip the bytes around
  FuncError = HexDec(AX$)             ! Function error code (decimal)
  FileError = HexDec(DX$)             ! File error code (decimal)

  ! For unexpected values, convert to 2's complement signed integer
  If (FuncError > 32767) FuncError = FuncError-65536
  If (FileError > 32767) FileError = FileError-65536

Here is a list of the function error codes in decimal form: 
Error
(FuncError) Description 
0 Function not supported 
1 Success 
2 CometAnywhere required 
3 Source file error (see suberrors) 
4 Aborted by user 
5 Function in progress 


Here is a list of the suberror codes (common Windows file errors) in decimal form: 

Suberror
(FileError) Description 
0 Success 
2 File not found 
3 Path not found 
5 Access denied 
12 Invalid access 
15 Invalid drive 
16 An error has occurred in the current directory 
18 No more files 
32 Sharing violation 
33 Lock violation 
80 File exists 
161 Bad pathname 

 
History:  This mnemonic was added in Comet Build 299 and REL Version 01.07.  

(Request ID)

 
Mnemonic:   (Request ID)  
Hex equivalent:  "@040001@"  
Discussion:  This mnemonic requests the QTerm workstation ID string.  
Example:  a. 100 FORMAT (Request ID)
   .
   PRINT (0,100)

b. PRINT (0) (Request ID)

(Reset Screen)

 
Mnemonic:   (Reset Screen)  
Discussion:  This mnemonic clears all windows and dialog boxes from the screen.  
History:  This mnemonic was added in Comet98.  
Example:  PRINT (0) (Reset Screen)

(Restore Screen)

 
Mnemonic:   (Restore Screen)  
Hex equivalent:  "@040004@"  
Discussion:  This mnemonic restores a screen display that has been previously saved with the (Save Screen) mnemonic.  
Example:  a. 100 FORMAT (Restore Screen)
   .
   PRINT (0,100)

b. PRINT (0) (Restore Screen)

(RestoreWaitCursor)

 
Mnemonic:  (RestoreWaitCursor)  
Discussion:  This mnemonic restores the hourglass cursor if it was previously turned on. 
See (BeginWaitCursor) and (EndWaitCursor). 
 
Example:  Print (BeginWaitCursor)
.
.
.
Print (RestoreWaitCursor)

(RJ)

Mnemonic: (RJ) Hex equivalent: "@0B@" Discussion: Right justify mark. The (RJ) control code is used to specify a numeric data entry field. This code places a right justify mark at the current cursor location, taking one screen position and displayed in suppressed background (invisible) mode. It causes data in the following foreground field to be entered from right to left. The right justify mark must be placed immediately before the field for which it is intended.

Characteristics of a right-justified field:

Field will accept numeric data only (digits, a decimal point, and a minus sign). Other keys will ring the bell and not be accepted.

Cursor remains at the right-hand side of the field (the position for the minus sign) during data entry.

Data is entered into the first position to the left of the cursor; the field is shifted left as each new character is entered.

Only one decimal point is permitted in the field.

The Backspace key deletes characters, one at a time, and shifts the field to the right.

The Clear key sets the entire field to foreground blanks. Note: As of Comet version 503.79, you can enter a decimal point or any numeric value to clear a right-justified field of any previously-displayed data. In earlier releases of Comet, only numeric values would clear the field.


The + and - keys toggle the minus sign at the right-hand side of the field.

Other text editing keys are not recognized.

Example: 100 FORMAT (SB);_  ! start background

            "ENTER CREDIT LIMIT:";_  ! prompt
            (TM);_                   ! transmit mark
            (RJ);_                   ! right justify mark
            (SF);_                   ! start foreground
            "          ";_           ! blank spaces
            (TM);                    ! transmit mark
            (CH)                     ! cursor home

. . . PRINT (0,100) INPUT (0) CRLIMIT

This example shows how to use the right justify control code for a numeric data entry field (credit limit). Notice the placement of the transmit marks. Also notice the placement of the foreground blank spaces for the data entry field.

(RD)

 
Mnemonic:   (RD)  
Hex equivalent:  "@040B@"  
Discussion:  Roll down. 
The (RD) control code moves the entire screen display down one line, rolling the bottom line completely off the screen. It also inserts a blank foreground line at the top of the screen and moves the cursor to the beginning of the inserted blank line (i.e., the upper left corner of the screen). 

See Roll Up (RU). 
 
Example:  a. 100 FORMAT (RD)
   .
   PRINT (0,100)

b. PRINT (0) (RD)

(RU)

 
Mnemonic:   (RU)  
Hex equivalent:  "@040A@"  
Discussion:  Roll up. 
The (RU) control code moves the entire screen display up one line, rolling the top line completely off the screen. Inserts a blank foreground line at the bottom of the screen. Moves the cursor to the beginning of the inserted blank line (i.e., the lower left corner of the screen). 

See Roll Down (RD). 
 
Example:  a. 100 FORMAT (RU)
   .
   PRINT (0,100)

b. PRINT (0) (RU)

(RoundRect)

 
Mnemonic:   (RoundRect = left, top, rigth, bottom, corner-width, corner-height)  
Discussion:  This mnemonic draws a rectangle with corners rounded using the ellipse specified by corner-width and corner-height at the location specified by left, top, right, bottom using the currently selected pen and brush.  
History:  This mnemonic is valid in Comet98 and greater.  
Personal tools