Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: using format twice

by zer (Deacon)
on Apr 05, 2006 at 03:41 UTC ( [id://541271]=note: print w/replies, xml ) Need Help??


in reply to Re: using format twice
in thread using format twice

ya as ugly as my code is............. yaaaaaaa..... no comment

BTW with the printf "%10d... it errors on numbers like 90000000000... part of the reason im doing this in perl and not C *shudders*

Replies are listed 'Best First'.
Re^3: using format twice
by GrandFather (Saint) on Apr 05, 2006 at 04:25 UTC

    No problem there. Change it to printf "%10s. That would work for C too. :)


    DWIM is Perl's answer to Gödel
      which data type is that?

        %s is a string format specification. The format specification matches /%([+-0#]? \d+ (.\d+)) ([bcdefginopsuxDEFGOUX])/x. Possibly most interesting to you are that a - left justifies in a field. The first digit group specifies the field width (minimum width for strings) and the second digit group is decimal digits for floats, minimum field width for integers and maximum field width for strings.

        The flags most likely of interest to you are 'd' or 'i' (integer), 'f' (float) and 's' (string).


        DWIM is Perl's answer to Gödel

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://541271]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-28 18:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found