Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

CENTRE( cString[, nOffset[, nWidth ]] )

Purpose

Determines the column at which to display a string, centered between
2 points.

Arguments

     cString -- string to display

     nOffset -- column to start at -- defaults to 0

     nWidth -- width of centring -- defaults to MAXCOL() + 1

Setup

None.

Example

     LOCAL msg := "Hello, earthling."
     @ 4, CENTRE( msg ) SAY msg
     @ 6, CENTER( msg, 5, 25 ) SAY msg

Returns

The column number at which to display cString, centred with respect to
nOffset and nWidth.

Side Effects

None.

Artful Calls

None.

Source File

AA_CENTR.PRG

Notes

The default value is MAXCOL() + 1 because MAXCOL() generates the number of
the last column and column numbering begins at 0. Thus, the total possible
width is MAXCOL() + 1 (not simply MAXCOL()).

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson