home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
CLIPUDF.ARC
/
CENTER.PRG
next >
Wrap
Text File
|
1986-02-04
|
512b
|
20 lines
*Title........CENTER
*Syntax.......CENTER(expC)
*Paramenters..Any string less than 80 characters in length.
*Returns......The appropriate column position to center the line.
*Notes........Use this function in place of a column coordinate.
* @ 12, CENTER("Hello") SAY "Hello"
FUNCTION CENTER
PARAM string
col_pos = LEN(string)
IF col_pos < 80
col_pos = INT((80 - col_pos) / 2)
ELSE
col_pos = 0
ENDIF
RETURN (col_pos)