Mnemonics "C"

From CometWiki

(Difference between revisions)
Jump to: navigation, search
(New page: == (CA Sessions) == Mnemonic: (CA Sessions=maximum-number-of-sessions) Discussion: This mnemonic sets a limit on the number of CometAnywhere sessions. The maximum-number-of-sessions is...)
Line 207: Line 207:
Retrieved from "http://64.142.11.195/index.php/Mnemonics"
Retrieved from "http://64.142.11.195/index.php/Mnemonics"
 +
 +
== (CFLD) ==
 +
 +
Mnemonic:  (CFLD) 
 +
Hex equivalent:  "@0407@" 
 +
Discussion:  Clear field.
 +
The (CFLD) control code clears all foreground characters in a field in which the cursor is located and replaces them with foreground blanks. It then positions the cursor in the first position of the field (left-most position for alphanumeric fields and right-most position for right-justified numeric fields). The control code does not affect background or invisible (suppressed background) fields.
 +
 +
This control code may also include a positioning statement to start the clearing operation at a specific point on the screen.
 +
 +
Example:  a. 100 FORMAT (CFLD),@(10,0)
 +
  .
 +
  PRINT (0,100)
 +
 +
b. PRINT (0) (CFLD),@(10,0)
 +
 +
This example demonstrates the "clear field" control code. The positioning statement puts the control into action at column 10, row 0. If this location is a foreground field, it will be cleared to foreground blanks (if not, the control code will do nothing). 
 +
 +
== (CF) ==
 +
 +
Mnemonic:  (CF) 
 +
Hex equivalent:  "@06@" 
 +
Discussion:  Clear foreground.
 +
The (CF) control code clears all foreground screen positions to foreground blanks and positions the cursor at the first foreground position on the screen (the upper left corner). This control does not affect background or invisible (suppressed background) screen positions.
 +
 +
This control code is typically used to clear input data from a formatted screen after it is entered in order to prepare for the next set of input data.
 +
 +
Example:  a. 100 FORMAT (CF)
 +
  .
 +
  PRINT (0,100)
 +
 +
b. PRINT (0) (CF)
 +
 +
This example shows how to clear all foreground screen positions. 
 +
 +
 +
== (CS) ==
 +
 +
Mnemonic:  (CS) 
 +
Hex equivalent:  "@05@" 
 +
Discussion:  Clear screen.
 +
The (CS) control code clears the entire screen to foreground blanks and moves the cursor to the home position.
 +
 +
Example:  a. 100 FORMAT (CS)
 +
  .
 +
  PRINT (0,100)
 +
 +
b. PRINT (0) (CS)
 +
 +
 +
==  (Close Icon) ==
 +
 +
Note: This feature is not supported beyond Comet 504.
 +
Mnemonic:  (Close Icon) 
 +
Hex equivalent:  "@CCB8@" 
 +
Discussion:  This mnemonic draws a graphical "close" icon on the screen, as shown here:
 +
 +
 +
The close icon occupies 2 spaces on the screen.
 +
 +
Note: The (Enhanced Characters On) mnemonic must be used before the (Close Icon) mnemonic us used.
 +
 +
Example:  a. 100 FORMAT (Close Icon)
 +
  .
 +
  PRINT (0,100)
 +
 +
b. PRINT (0) (Close Icon)
 +
 +
 +
== Close the mouse ==
 +
 +
Use the following instruction to close the mouse driver:
 +
 +
 +
    PRINT (0) (Mouse off)
 +
 +
See also Show/hide the mouse cursor.
 +
 +
The mouse cursor may be shown or hidden. For mouse-driven applications, you will normally want to show the mouse cursor. For touch-sensitive screen applications, you will normally want to hide the mouse cursor.
 +
 +
 +
To show the regular cursor, use the following instruction:
 +
 +
          PRINT (0) (Show Mouse Cursor)
 +
 +
 +
To hide the regular cursor, use the following instruction:
 +
 +
          PRINT (0) (Hide Mouse Cursor)
 +
 +
Also see Regular cursor display.
 +
 +
(Copy from Clipboard)
 +
Mnemonic:  (Copy from Clipboard) 
 +
Discussion:  This mnemonic, which is used with the system driver (X00), copies the contents from the Windows clipboard into one or more program variables. This mnemonic is issued via a PRINT statement, and the clipboard data is obtained via a subsequent INPUT statement (see example below).
 +
Also see:
 +
 +
 +
== (Copy to Clipboard) ==
 +
 +
 +
== (Query Clipboard) ==
 +
 +
 +
 +
History:  This mnemonic was added in REL 01.05 and requires Build 292 or higher. 
 +
Example 1:  LENGTH 254 & LOCAL RESULT$      ! Define a variable
 +
.
 +
.
 +
.
 +
Open (1) "X00"                  ! Open system driver
 +
Print (1) (CopyFromClipboard)    ! Copy data from clipboard
 +
Input (1) Result$                ! to this variable
 +
Close (1)                        ! Close system driver
 +
 +
 +
Example 2:  LENGTH 254 & LOCAL A$,B$,C$      ! Define 3 variables
 +
 +
CLIP: FORMAT A$;B$;C$            ! FORMAT statement for clipboard data
 +
 +
Open (1) "X00"                  ! Open system driver
 +
Print (1) (CopyFromClipboard)    ! Copy data from clipboard
 +
Input (1,CLIP)                  ! to the variables in this FORMAT statement
 +
Close (1)                        ! Close system driver

Revision as of 12:21, 31 May 2009

Contents

(CA Sessions)

Mnemonic: (CA Sessions=maximum-number-of-sessions) Discussion: This mnemonic sets a limit on the number of CometAnywhere sessions. The maximum-number-of-sessions is a decimal value. To get information on the current setting, set the argument to 0 and follow the mnemonic with an INPUT (see example 2).

Example 1: Print (CA Sessions=3)



This example sets the maximum number of CometAnywhere sessions to 3.

Example 2: Print (CA Sessions=0) Input A$



This example sets the argument to 0.

As a result, the current setting is returned to the string variable contained in the next INPUT statement following the mnemonic. The return value is a one-byte hex string. For example, if the current maximum-number-of-sessions is 3, the hex value "@03@" is assigned to A$.


(CapsOff)

Mnemonic: (CapsOff) Discussion: This mnemonic turns the Caps Lock keyboard function off. See (CapsOn).

Example: Print (CapsOff)


(CapsOn)

Mnemonic: (CapsOn) Discussion: This mnemonic turns the Caps Lock keyboard function on. See (CapsOff).

Example: Print (CapsOn)

(CC)

Email Mnemonic: (CC=string-argument) Discussion: The (CC) mnemonic may be used to specify the "carbon copy" recipients of your email message. Example: OPEN (1) "LEH" PRINT (1) (CC="barbara@@signature.net")


(CF)

Mnemonic: (CF) Hex equivalent: "@06@" Discussion: Clear foreground. The (CF) control code clears all foreground screen positions to foreground blanks and positions the cursor at the first foreground position on the screen (the upper left corner). This control does not affect background or invisible (suppressed background) screen positions.

This control code is typically used to clear input data from a formatted screen after it is entered in order to prepare for the next set of input data.

Example: a. 100 FORMAT (CF)

 .
 PRINT (0,100)

b. PRINT (0) (CF)

This example shows how to clear all foreground screen positions.



Read about other Email Mnemonics


(CFLD)

Mnemonic: (CFLD) Hex equivalent: "@0407@" Discussion: Clear field. The (CFLD) control code clears all foreground characters in a field in which the cursor is located and replaces them with foreground blanks. It then positions the cursor in the first position of the field (left-most position for alphanumeric fields and right-most position for right-justified numeric fields). The control code does not affect background or invisible (suppressed background) fields.

This control code may also include a positioning statement to start the clearing operation at a specific point on the screen.

Example: a. 100 FORMAT (CFLD),@(10,0)

 .
 PRINT (0,100)

b. PRINT (0) (CFLD),@(10,0)

This example demonstrates the "clear field" control code. The positioning statement puts the control into action at column 10, row 0. If this location is a foreground field, it will be cleared to foreground blanks (if not, the control code will do nothing).


(CH)

Mnemonic: (CH) Hex equivalent: Discussion: Cursor home. The (CH) control code moves the cursor to the "home" position on the screen. Home position is the upper left foreground location of the screen. Since the cursor will land only in a foreground area, "home" may be something other than the upper left corner.

For example, if the upper left corner of the screen contains background or invisible (suppressed background) characters, the cursor will search to the right and to the next line(s) if necessary for the first available foreground position.

Once a foreground field is located, the cursor will be positioned at the first location in that field (left-most position for alphanumeric fields and right-most position for right-justified numeric fields).

Example: a. 100 FORMAT (CH)

 .
 PRINT (0,100)

b. PRINT (0) (CH)

This example shows how to move the cursor to the home position.


(Change Color)

Mnemonic: (Change Color=ARG1$) Hex equivalent: "@0E0E0Bxx00@" where: xx = the foreground color

Discussion: This mnemonic changes the foreground color attribute on the Comet console, and is effective only for the current write operation. ARG1$ is the foreground color; it may be a string constant or a string variable containing the hex representation of the screen color.



See Screen Colors for a list of color codes.

Also see (Change Colors) for a way to change all of the screen colors.

Example: a. 100 FORMAT (Change Color="@07@")

 .
 PRINT (0,100)

b. PRINT (0) (Change Color="@07@")


(Change Colors)

Mnemonic: (Change Colors=ARG1$,ARG2$,ARG3$,ARG4$,ARG5$) Hex equivalent: "@0E0E0Evvwwxxyyzz@" where: vv = the foreground color ww = the background color xx = the invisible color (for TM's, TP's, and RJ's) yy = the border color zz = the entry field color


Discussion: The mnemonic changes all of the screen colors on the Comet console, or within the current Comet window. ARG1$ is the foreground color ARG2$ is the background color ARG3$ is the invisible color (for TM's, TP's, and RJ's) ARG4$ is the border color ARG5$ is the entry field color


All of these arguments are in hex and may be string constants or a string variable containing the hex representation of the screen color.



See Screen Colors for a list of color codes.

Also see (Change Color) for a way to change the foreground color only.

Example: a. 100 FORMAT (Change colors="@0F@","@A0@","@00@","@C0@","@0F@")

 .
 PRINT (0,100)

b. Print (0) (Change colors="@0F@","@A0@","@00@","@C0@","@0F@")


(CPL132)

Mnemonic: (CPL132) Hex equivalent: "@040009@" Discussion: This mnemonic sets the video display mode to 132 characters per line. Also see (Screen), (CPL64), (CPL80), and (DE).

Example: a. 100 FORMAT (CPL132)

 .
 PRINT (0,100)

b. PRINT (0) (CPL132)


(CPL64)

Mnemonic: (CPL64) Hex equivalent: "@0402@" Discussion: The (CPL64) control code sets the screen display mode to 64 characters per line by 27 lines. The screen is cleared to foreground blanks and the cursor is moved to the "home" position. (Note: In normal mode, the cursor will be moved to the upper left corner of the screen. If typewriter mode is in effect, the cursor will be moved to the lower left corner of the screen.) This control code may be overridden by the system configuration (if the configuration forces the screen display to 80 columns, for example). 

Also see (Screen), (CPL132), (CPL80), and (DE).

Example: a. 100 FORMAT (CPL64)

 .
 PRINT (0,100)

b. PRINT (0) (CPL64)


(CPL80)

Mnemonic: (CPL80) Hex equivalent: "@0403@" Discussion: The (CPL80) control code sets the screen display mode to 80 characters per line by 24 lines. The screen is cleared to foreground blanks and the cursor is moved to the "home" position. (Note: In normal mode, the cursor will be moved to the upper left corner of the screen. If typewriter mode is in effect, the cursor will be moved to the lower left corner of the screen.) Also see (Screen), (CPL132), (CPL64), and (DE).

Example: a. 100 FORMAT (CPL80)

 .
 PRINT (0,100)

b. PRINT (0) (CPL80)



(Check Box Off)

Note: This feature is not supported beyond Comet 504. Mnemonic: (Check Box Off) Hex equivalent: "@CAC6B6@" Discussion: This mnemonic draws a graphical check box on the screen. The check box is in the "off" position (i.e., no check mark appears in the box), as shown here:


The check box symbol occupies 3 spaces on the screen.

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

Also see (Check Box On).

Example: a. 100 FORMAT (Check Box Off)

 .
 PRINT (0,100)

b. PRINT (0) (Check Box Off)


(Check Box On)

Note: This feature is not supported beyond Comet 504. Mnemonic: (Check Box On) Hex equivalent: "@CACEB6@" Discussion: This mnemonic draws a graphical check box on the screen. The check box is in the "on" position (i.e., a check mark appears in the box), as shown here:


The check box symbol occupies 3 spaces on the screen.

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

Also see (Check Box Off).

Example: a. 100 FORMAT (Check Box On)

 .
 PRINT (0,100)

b. PRINT (0) (Check Box On)

Retrieved from "http://64.142.11.195/index.php/Mnemonics"

(CFLD)

Mnemonic: (CFLD) Hex equivalent: "@0407@" Discussion: Clear field. The (CFLD) control code clears all foreground characters in a field in which the cursor is located and replaces them with foreground blanks. It then positions the cursor in the first position of the field (left-most position for alphanumeric fields and right-most position for right-justified numeric fields). The control code does not affect background or invisible (suppressed background) fields.

This control code may also include a positioning statement to start the clearing operation at a specific point on the screen.

Example: a. 100 FORMAT (CFLD),@(10,0)

  .
  PRINT (0,100)

b. PRINT (0) (CFLD),@(10,0)

This example demonstrates the "clear field" control code. The positioning statement puts the control into action at column 10, row 0. If this location is a foreground field, it will be cleared to foreground blanks (if not, the control code will do nothing).

(CF)

Mnemonic: (CF) Hex equivalent: "@06@" Discussion: Clear foreground. The (CF) control code clears all foreground screen positions to foreground blanks and positions the cursor at the first foreground position on the screen (the upper left corner). This control does not affect background or invisible (suppressed background) screen positions.

This control code is typically used to clear input data from a formatted screen after it is entered in order to prepare for the next set of input data.

Example: a. 100 FORMAT (CF)

  .
  PRINT (0,100)

b. PRINT (0) (CF)

This example shows how to clear all foreground screen positions.


(CS)

Mnemonic: (CS) Hex equivalent: "@05@" Discussion: Clear screen. The (CS) control code clears the entire screen to foreground blanks and moves the cursor to the home position.

Example: a. 100 FORMAT (CS)

  .
  PRINT (0,100)

b. PRINT (0) (CS)


(Close Icon)

Note: This feature is not supported beyond Comet 504. Mnemonic: (Close Icon) Hex equivalent: "@CCB8@" Discussion: This mnemonic draws a graphical "close" icon on the screen, as shown here:


The close icon occupies 2 spaces on the screen.

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

Example: a. 100 FORMAT (Close Icon)

  .
  PRINT (0,100)

b. PRINT (0) (Close Icon)


Close the mouse

Use the following instruction to close the mouse driver:


    PRINT (0) (Mouse off)

See also Show/hide the mouse cursor.

The mouse cursor may be shown or hidden. For mouse-driven applications, you will normally want to show the mouse cursor. For touch-sensitive screen applications, you will normally want to hide the mouse cursor.


To show the regular cursor, use the following instruction:

         PRINT (0) (Show Mouse Cursor)


To hide the regular cursor, use the following instruction:

         PRINT (0) (Hide Mouse Cursor)

Also see Regular cursor display.

(Copy from Clipboard) Mnemonic: (Copy from Clipboard) Discussion: This mnemonic, which is used with the system driver (X00), copies the contents from the Windows clipboard into one or more program variables. This mnemonic is issued via a PRINT statement, and the clipboard data is obtained via a subsequent INPUT statement (see example below). Also see:


(Copy to Clipboard)

(Query Clipboard)

History: This mnemonic was added in REL 01.05 and requires Build 292 or higher. Example 1: LENGTH 254 & LOCAL RESULT$  ! Define a variable . . . Open (1) "X00"  ! Open system driver Print (1) (CopyFromClipboard)  ! Copy data from clipboard Input (1) Result$  ! to this variable Close (1)  ! Close system driver


Example 2: LENGTH 254 & LOCAL A$,B$,C$  ! Define 3 variables

CLIP: FORMAT A$;B$;C$  ! FORMAT statement for clipboard data

Open (1) "X00"  ! Open system driver Print (1) (CopyFromClipboard)  ! Copy data from clipboard Input (1,CLIP)  ! to the variables in this FORMAT statement Close (1)  ! Close system driver

Personal tools