Re: Centering text on the 80 column display

From: Judson Powers (powers@RJSONLINE.NET)
Date: 03/29/98


On Sun, Mar 29, 1998 12:56 PM, Daniel Koepke
<mailto:dkoepke@CALIFORNIA.COM> wrote:
> That's not really centered, it's off because you only subtract the
> length of the string from the center.  This means that if you were
> centering a 4 character long string ("this") in 20 spaces, you'd get
> ("dist = 10-4 = 6"), "      this          ".  You probably want,

Thank you.  Had a minor brain short there.  However, you don't have to
print spaces to the right of the string that's being centered.  Also, it's
usually better to concat the spaces and the string and then print them, to
reduces your I/O calls.

Judson Powers                 Morgaelin MUD
powers@rjsonline.net          telnet://mud.dwango.com:3000/

"Friends help you move... real friends help you move bodies."


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST