Re: centering display
- Posted by petelomax Mar 22, 2019
- 1737 views
Senator said...
euphoric said...
Since it's a string anyway, you could use
display("[c:" & sprint(RM) & "]", {"This text is not centered"})
That's one way.
Thanks euphoric, works like a charm.
Yeah, but doesn't that say This text is not centered when actually it is centered? scnr
On a slightly more serious note,
printf(1,">%6s<\n",{"four"}) -- produces "> four<" printf(1,">%-6s<\n",{"four"}) -- produces ">four <"
Does anyone any have any suggestion/preference for a format string that would produce "> four <"?
(Obviously, there isn't one, but if I were to implement it what would feel right as the third alternative to "%6s" and "%-6s"? "%|6s"? "%=6s"?)