summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2022-11-27 14:01:07 -0500
committerMitsuo Tokumori <[email protected]>2022-11-27 14:01:07 -0500
commitce58d6504665422a0817cf0ddb38fc533d0de33e (patch)
treeb6b3879a521fa0f0806a27bedcb979a27bb04e06
parent337c2e523dc1a849804e0749fc85e2fb8bfa53a3 (diff)
downloadLP1-ce58d6504665422a0817cf0ddb38fc533d0de33e.tar.gz
LP1-ce58d6504665422a0817cf0ddb38fc533d0de33e.tar.bz2
LP1-ce58d6504665422a0817cf0ddb38fc533d0de33e.zip
Little changes to formatting.adoc
-rw-r--r--tips/formatting.adoc5
1 files changed, 4 insertions, 1 deletions
diff --git a/tips/formatting.adoc b/tips/formatting.adoc
index 58c5251..96b4e71 100644
--- a/tips/formatting.adoc
+++ b/tips/formatting.adoc
@@ -35,7 +35,7 @@ Example implementation:
// https://stackoverflow.com/q/7186504/7498073
// Width-Left (use with strings)
-#define WL(w) " " << setw((w) - 1) << left << setprecision(2) << fixed
+#define WL(w) " " << setw((w) - 1) << left
// Width-Right (use with numbers)
#define WR(w) setw(w) << right << setprecision(2) << fixed
@@ -51,7 +51,10 @@ Example implementation:
<< '/' << WR0(2, 2, (x) / 100 % 100) \
<< '/' << WR0(4, 4, (x) / 10000)
+// (for character arrays)
#define MAXLEN 100
+// (for static arrays of items)
+#define MAXITEMS 1000
----
Example usage: