Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Messageboxes
Message
From
02/10/1998 09:02:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
29/09/1998 17:06:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00142123
Message ID:
00143181
Views:
26
>cMsg1="Hi there I'm a centered"
>cMsg2="Two line message!"
>nMsg1Len=LEN(cMsg1)
>nMsg2Len=LEN(cMsg2)

instead of:
>nRefLen=MAX(nMsg1Len,nMsg2Len)
>cMsg1=PADL(cMsg1,nMsg1Len+((nRefLen-nMsg1Len)*.5),CHR(32))
>cMsg2=PADL(cMsg2,nMsg2Len+((nRefLen-nMsg2Len)*.5),CHR(32))

Why not:
>nRefLen=MAX(nMsg1Len,nMsg2Len)+6 && just adding at least three spaces around
>cMsg1=PadC(cMsg1,nRefLen)
>cMsg2=PadC(cMsg2,nRefLen)

Though, it won't be centered with proportional fonts anyway, and I also think centering was not required at all.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform