Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Document ? in format specifiers, e.g. {w=?}


For mysite; matching the {w=?} patchset.

---
 doc/libstd/fmt.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/libstd/fmt.txt b/doc/libstd/fmt.txt
index 563049c..688c776 100644
--- a/doc/libstd/fmt.txt
+++ b/doc/libstd/fmt.txt
@@ -47,6 +47,11 @@ an integer can be padded with zeros and formatted in hex with the following
 format specifier: `{p=0,x}`. If you want a literal '{' character, it can
 be escaped by doubling it.
 
+If the character `?` is used as the argument to a format parameter, the
+actual argument used will be pulled out of the list of values. For
+example, `std.put("{w=?,p=?}\n", 30, "a", "foo")` will produce the same
+output as `std.put("{w=30,p=a}\n", "foo").
+
 None of the format specifiers print a newline character by default.
 
 Format Specifiers
-- 
2.24.0