summaryrefslogtreecommitdiff
path: root/bugs-fixed/string-conv.awk
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2019-06-02 04:23:56 +0000
committerWarner Losh <imp@FreeBSD.org>2019-06-02 04:23:56 +0000
commit03ee4d05f1d963d60451e04ce505e4da116300db (patch)
tree9dcabc6cffafcb6b8195148feb519d575b0bf6ac /bugs-fixed/string-conv.awk
parent3a4488f93f2dc8fe9de757a418b74aa0aa4f9ed1 (diff)
Notes
Diffstat (limited to 'bugs-fixed/string-conv.awk')
-rw-r--r--bugs-fixed/string-conv.awk13
1 files changed, 13 insertions, 0 deletions
diff --git a/bugs-fixed/string-conv.awk b/bugs-fixed/string-conv.awk
new file mode 100644
index 000000000000..a1f04aba354b
--- /dev/null
+++ b/bugs-fixed/string-conv.awk
@@ -0,0 +1,13 @@
+BEGIN {
+ OFMT = ">>%.6g<<"
+ a = 12.1234
+ print "a =", a
+ b = a ""
+ print "1 ->", b
+ CONVFMT = "%2.2f"
+ b = a ""
+ print "2 ->", b
+ CONVFMT = "%.12g"
+ b = a ""
+ print "3 ->", b
+}