The QBasic Forum     RULES     Other Subforums, Links and Downloads    Index of Threads

 Return to Index  

How to Center any text! Nice easy, helpfull program.

April 3 2007 at 9:56 PM
drew  (no login)

CLS
INPUT "TEXT ", TEXT$
A = LEN(TEXT$)
MIDDLE = 78 / 2 - A / 2
LOCATE 23 / 2, MIDDLE : PRINT TEXT$
locate 23 / 2 + 2, middle : PRINT 23 / 2; MIDDLE


'cool huh? Before I made this I always had to guess and check every single text 'that I wanted to center. This helps with intro pages to games and stuff like 'that!


 
 Respond to this message   
Response TitleAuthorDate
 My intro.E.K.VirtanenApr 5, 2007
  forgot.E.K.VirtanenApr 5, 2007
   Do not worry about itroyApr 5, 2007
    I visit here daily.E.K.VirtanenApr 5, 2007
     *I think someones have gone but YOU may get them back. lolroyApr 6, 2007
      nah... Apr 10, 2007