develooper Front page | perl.perl5.porters | Postings from October 2000

[ID 20001031.001] printf ("%*c"... possible problem

Thread Next
October 31, 2000 06:19
[ID 20001031.001] printf ("%*c"... possible problem
Message ID:

This is a bug report for perl from,
generated with the help of perlbug 1.20 running under perl 5.00404.

[Please enter your report here]

I believe there is a problem in the way perl handles field widths in
printf style format strings (especially w.r.t similar "C" handling).

perl -e 'printf ("%2c-\n", " ");'

should print out 2 spaces followed by a dash.  ie.  "  -"

more simply:

perl -e 'printf ("%c-\n", " ");'

does not print the space at all!

This also fails with perl 5.6.0 built for i586-linux.

[Please do not change anything below this line]

Site configuration information for perl 5.00404:

Configured by fulko at Tue Aug 18 11:17:34 EDT 1998.

Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
    osname=sco_sv, osvers=3.2, archname=i386-sco_sv
    uname='sco_sv fulko 3.2 2 i386 '
    hint=previous, useposix=true, d_sigaction=define
    bincompat3=y useperlio=undef d_sfio=undef
    cc='cc', optimize=' ', gccversion=
    cppflags='-w0 -U M_XENIX -DPERL_SCO5 -I/usr/local/include'
    ccflags ='-w0 -U M_XENIX -DPERL_SCO5 -I/usr/local/include'
    stdchar='unsigned char', d_stdstdio=undef, usevfork=false
    voidflags=15, castflags=0, d_casti32=undef, d_castneg=define
    intsize=4, alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /shlib /lib /usr/lib /usr/ccs/lib
    libs=-lintl -lsocket -lnsl -lndbm -ldbm -lld -lm -lc -lcrypt -lPW -lx
    libc=, so=so
    useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
    cccdlflags='', lddlflags=''

Locally applied patches:

@INC for perl 5.00404:

Environment for perl 5.00404:
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About