summaryrefslogtreecommitdiff
path: root/lib/std/fmt.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/fmt.myr')
-rw-r--r--lib/std/fmt.myr3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/std/fmt.myr b/lib/std/fmt.myr
index b981a74..c4c3797 100644
--- a/lib/std/fmt.myr
+++ b/lib/std/fmt.myr
@@ -210,6 +210,7 @@ const sbfmtv = {sb, fmt, ap -> size
if startp != nbuf
param[nparam++] = (buf[startp:nbuf], "")
;;
+ startp = nbuf
| (`ParamOpt, '}'):
state = `Copy
if startp != nbuf
@@ -455,12 +456,14 @@ const fltparams = {params
fp = [
.mode = MNormal,
.cutoff = 0,
+ .scientific = false,
.padfill = ' ',
.padto = 0,
]
for p : params
match p
+ | ("e", ""): fp.scientific = true
| ("w", wid): fp.padto = getint(wid, "fmt: width must be integer")
| ("p", pad): fp.padfill = decode(pad)
| ("s", sig):