Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Printf/Sprintf Behavior Change

by McA (Priest)
on Sep 16, 2013 at 16:37 UTC ( #1054314=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    print sprintf("%0.02f",0.345);
  2. or download this
    perl -E 'print sprintf("%0.18f",0.346);'
  3. or download this
    #!/usr/bin/env perl
    use strict;
    if ($tprice < 1  && length($tprice) > 4) {
        print "SPRINTF - $tprice -  " . sprintf("%0.18f",$tprice) . "\n";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054314]
[Corion]: Two-way data binding means that if you change something in a text box, the corresponding variable in your Javascript gets updated immediately as well, and if you then change the variable, the corresponding text box also gets updated
[Corion]: That is a horrible approach that was also taken by Access, but if you have hooks that prevent automatic saving to the database, it is incredibly handy

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-03-30 07:56 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (355 votes). Check out past polls.