CharWin()

CHARWIN()

Exchanges particular characters in a screen area.

Syntax

       CHARWIN([<nTopline>,<nLeftcolumn>,<nBottomline>,
              <nRightcolumn>, [<cNewcharacter|nNewcharacter>],
              [<cOldcharacter|nOldcharacter>]]) --> cNull

Arguments

<nTopline> Designates the line for the top-left corner of the area.

<nLeftcolumn> Designates the column for the top-left corner the area.

<nBottomline> Designates the line for the bottom-right corner of the area.

<nRightcolumn> Designates the column for the bottom-right corner of the area.

<cNewcharacter|nNewcharacter> Designates the new character for the screen area. Specify the parameter as a numeric in the range of 0 to 255 or as a character string. The default value is the CLEARB.

<cOldcharacter|nOldcharacter> Designates which character to exchange. Specify the parameter as a numeric in the range of 0 to 255 or as a character string. The default is to exchange all characters.

() When no parameter is designated, the function replaces all characters in the screen area with CLEARB.

Returns

The function always returns a null string.

Description

Within a screen area, CHARWIN() replaces all characters or just a particular character with a new one. If <cNewcharacter|nNewcharacter> is not designated, the function uses the character set with SETCLEARB(), where the preset value is CHR(255). The upper-left and lower-right corner rows and columns are given for the borders of the area. If these arguments are missing, then the entire screen area is exchanged.

Examples

       .  Exchange all characters for CLEARB:
              SETCLEARB("X")       // Exchanges within CHARWIN() entire screen
           .  Exchange all "A" for "B":
              CHARWIN(10, 10, 20, 70, "B", "A")    // Always returns a ("") null
                                                   // string
           .  Numeric characters can also be designated:
              CHARWIN(10, 10, 20, 70, 66, 65)      // A = 65, B = 66

See also

SETCLEARB(), COLORWIN(), Introduction

Advertisements

2 responses to “CharWin()

  1. Pingback: Harbour String Functions | Viva Clipper !

  2. Pingback: Harbour All Functions – C | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s