Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'printf "%$x.0d", 0' doesn't print 0 #280

Closed
p5pRT opened this issue Jul 28, 1999 · 2 comments
Closed

'printf "%$x.0d", 0' doesn't print 0 #280

p5pRT opened this issue Jul 28, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 28, 1999

Migrated from rt.perl.org#1102 (status was 'resolved')

Searchable as RT1102$

@p5pRT
Copy link
Author

p5pRT commented Jul 28, 1999

From pudge@perl.org

In perl5.004_05, printf stopped working right with $x.0d when 0
is the value. In 5.004_04 it worked.

defender​:~> perl -e 'printf "$]​:%4.0d\n", 0'
5.00405​:

rock% perl -e 'printf "$]​:%4.0d\n", 0'
5.00404​: 0

Perl Info


Site configuration information for perl 5.00405:

Configured by darren at Wed Jul  7 12:50:41 PDT 1999.

Summary of my perl5 (5.0 patchlevel 4 subversion 5) configuration:
  Platform:
    osname=linux, osvers=2.0.36, archname=i386-linux
    uname='linux broca 2.0.36 #2 sun nov 29 02:38:59 pst 1998 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    bincompat3=n useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release)
    cppflags='-Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/usr/local/include'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=undef, doublesize=undef
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldbm -ldb1 -ldl -lm -lc -lposix -lcrypt
    libc=/lib/libc-2.1.1.so, so=so
    useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl 5.00405:
    /usr/lib/perl5/5.004/i386-linux
    /usr/lib/perl5/5.004
    /usr/local/lib/site_perl/i386-linux
    /usr/local/lib/site_perl
    /usr/lib/perl5
    /usr/lib/perl5/i386-linux/5.004
    /usr/lib/perl5/5.004/i386-linux
    .


Environment for perl 5.00405:
    HOME=/home/pudge
    LANG (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/pudge/bin:.
    PERL_BADLANG (unset)
    SHELL=/bin/csh

@p5pRT
Copy link
Author

p5pRT commented Sep 12, 1999

From @gsar

On Wed, 28 Jul 1999 18​:58​:58 EDT, Chris Nandor wrote​:

This is a bug report for perl from pudge@​perl.org,
generated with the help of perlbug 1.26 running under perl 5.00405.

-----------------------------------------------------------------
[Please enter your report here]

In perl5.004_05, printf stopped working right with $x.0d when 0
is the value. In 5.004_04 it worked.

defender​:~> perl -e 'printf "$]​:%4.0d\n", 0'
5.00405​:

rock% perl -e 'printf "$]​:%4.0d\n", 0'
5.00404​: 0

This was deemed a bug in 5.004_01, but I'm not sure if the special
case is actually mandated by a standard. See​:

  http​://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1997-10/msg01887.html
  http​://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1997-11/msg00090.html

Sarathy
gsar@​activestate.com

@p5pRT p5pRT closed this as completed Nov 28, 2003
jkeenan pushed a commit that referenced this issue Nov 2, 2023
0.000159  2023-10-25 14:09:23-07:00 America/Los_Angeles

    - Document that diag() intentionally returns false, and add a `return 0`

0.000158  2023-10-22 22:05:42-07:00 America/Los_Angeles

    - Mark Workflow-Acceptance.t as AUTHOR_TESTING

0.000157  2023-10-22 21:26:49-07:00 America/Los_Angeles

    - Fix #280: Document --no_srand option in Test2::V0
    - Fix #276: Document bool() import in Test2::V0
    - Fix #279: Merged fix for VMS test issues
    - Fix #277: Merged POD tweaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant