1. 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 |

new topic     » topic index » view message » categorize

2. 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

new topic     » goto parent     » topic index » view message » categorize

3. Re: print_centered

Hello all!
Can someone please offer a tip or two on communicating to/from the comm
ports?
I've tried Jacques' PORTS.E' but keep getting a type error.
I want to send/receive strings of text in a BBS door environment.
How should the 'file' be opened?
Any existing code for this type of I/O?

Thanks,

Ray in Colorado
The Chalk Board BBS
Modem:(970)330-0383

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu