summaryrefslogtreecommitdiff
path: root/test/convfmt.awk
blob: 90fd204b2fc34a429031d9781ca90081db9b6736 (plain)
1
2
3
4
5
6
7
8
9
10
BEGIN {
	CONVFMT = "%2.2f"
	a = 123.456
	b = a ""                # give `a' string value also
	printf "a = %s\n", a
	CONVFMT = "%.6g"
	printf "a = %s\n", a
	a += 0                  # make `a' numeric only again
	printf "a = %s\n", a    # use `a' as string
}