New Alpha_(re)

Thu, 3 Apr 1997 14:49:31 +0200



Peter Gerwinski wrote:

> > >  * Field widths now default to left-justified output.
> >
> > Did I miss a discussion on this?  Doesn't this break a lot of programs?
> > Or is this with "--borland-pascal"?
>
> Perhaps my formulation was misleading:  I mean that
>
>     writeln ( 123 );
>
> will no more yield the output
>
>     _______123
>
> (with seven blanks), but instead
>
>     123
>
> (left-justified).  To produce "_______123" you must explicitly say
> "writeln ( 123 : 10 );".

Perhaps you should write "field width now defaults to 0" (or 1 - what is it?).
By "left justified" I would mean "123_______".

Since Phil mentioned why the default was a bigger width, I now think
this should be toggled by the --borland-pascal switch, and a separate
switch as well. E.g., I try to make my programs not dependent on the
--borland-pascal switch, but this problem (together with the "clipping"
in standard Pascal) would require a lot of changes that I can't do soon...

BTW: Phil, how do you output a number without spaces (or, let's say
with exactly one space) in standard Pascal, e.g. to write the simple line
"There are 7 items" (with 7 being the value of a variable)?
With no (or a big) format specifier, there would be more spaces than
wanted, with a small format specifer, large numbers would be cut.

Or does this "clipping" only apply to strings?
But then again, how would you do "You name is Phil."?
Do you have to "write(s:Length(s))" or such?
-- 
Frank Heckenbach, Erlangen, Germany
heckenb@mi.uni-erlangen.de
Turbo Pascal:   http://www.mi.uni-erlangen.de/~heckenb/programs.htm
Internet links: http://www.mi.uni-erlangen.de/~heckenb/links.htm


Frank Heckenbach (heckenb@mi.uni-erlangen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es