home *** CD-ROM | disk | FTP | other *** search
- *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)