Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - center(<c string>, <n width in which to center string>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CENTER(<C string>, <N width in which to center string>)
 Centers output without calculating its start position.
 Returns <expC> of <string> with leading blanks added to center in <width>.

 When used with the @...SAY command, the column number
 should always be zero.

 * Column is zero, <width> is screen size
 @ ROW(), 0 SAY CENTER("Hello, world!", 80)

 * Column is zero, <width> is printer form size
 @ PROW(), 0 SAY CENTER("Hello, world!", 132)

 * Unformatted output, <width> is screen size
 ? CENTER( STR(123.45, 6, 2), 80 )


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: ALLTRIM() EXPAND() LJUST() RJUST()

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