1*3ee4fc2aSCody Peter MelloBEGIN { 2*3ee4fc2aSCody Peter Mello CONVFMT = "%2.2f" 3*3ee4fc2aSCody Peter Mello a = 123.456 4*3ee4fc2aSCody Peter Mello b = a "" # give `a' string value also 5*3ee4fc2aSCody Peter Mello printf "a = %s\n", a 6*3ee4fc2aSCody Peter Mello CONVFMT = "%.6g" 7*3ee4fc2aSCody Peter Mello printf "a = %s\n", a 8*3ee4fc2aSCody Peter Mello a += 0 # make `a' numeric only again 9*3ee4fc2aSCody Peter Mello printf "a = %s\n", a # use `a' as string 10*3ee4fc2aSCody Peter Mello} 11