develooper Front page | perl.perl6.language | Postings from March 2002

Re: rethinking printf

Thread Previous | Thread Next
From:
Peter Scott
Date:
March 10, 2002 17:34
Subject:
Re: rethinking printf
Message ID:
4.3.2.7.2.20020310171805.00a81310@shell2.webquarry.com
At 01:39 AM 3/11/02 +0100, Eugene van der Pijll wrote:
>Why not replace the escape character '%' with '#'? No new quoting
>operators or functions to learn.

Beat me to it.

>And introduce a warning if there are
>no #'s in the format string.

Maybe if it's a constant, but not if you're doing something like

         printf "#.3f " x @nums, @nums;

and @nums is empty.  You could always scan the format for a %-specifier
which was valid under the old rules and warn that they seem to be using 
retro syntax.

# bespeaks a number-type of thing... how about ~ ?
--
Peter Scott
Pacific Systems Design Technologies


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About