Re: print_centered
At 22:08 20-12-96 -0500, you wrote:
>---------------------- Information from the mail header -----------------------
>Sender: Euphoria Programming for MS-DOS <EUPHORIA at
>MIAMIU.ACS.MUOHIO.EDU>
>Poster: Vic <cybrgod at IBM.NET>
>Subject: print_centered
>-------------------------------------------------------------------------------
>
>Hello,
>I have found it hard to center text on the screen and made a little
>procedure that will do it for you. Some of you may have already done this,
>but for those who haven't here it is:
>
>-----------------------
>procedure print_centered( sequence s)
>for x=1 to ((80-length(s))/2) do -- works in default text mode only
>puts(1," ") -- but you can tweak it to work in other
>end for -- modes, can't you? (just change the 80)
>puts(1,s)
>end procedure
>
>print_centered("Cyrbgod at hotmail.com\n")
>print_centered("Vicas Patel\n")
>print_centered("Now THIS is centered Text!!!")
>--------------------
> _________________________________________________________________
>| http://www.geocities.com/SiliconValley/Heights/8858/home.htm |
>| It's so difficult to work in groups when you are omnipotent. -Q |
>
another solution to this problem could be.
puts(1,repeat(32,floor((80-length(s))/2))&s)
Merry Chrismass Vic
Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at quebectel.com
|
Not Categorized, Please Help
|
|