diff options
author | pommicket <pommicket@gmail.com> | 2025-09-07 17:37:44 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-07 17:37:44 -0400 |
commit | 368dbbfc70b160418dd92027edce0715bf4dbafa (patch) | |
tree | 637bc8aafafe218f74e65b1528fa45c925324f6d | |
parent | 6a58f4bebafc418ed9d3b96c10f40f06baa3fbaf (diff) |
Minor revisions to spec
-rw-r--r-- | site/spec.html | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/site/spec.html b/site/spec.html index 90573d6..362d9f4 100644 --- a/site/spec.html +++ b/site/spec.html @@ -438,14 +438,14 @@ and for my.nephews.car.id is String (no schema key matches, so the default of St <li><code>Bool</code> — accepts <code>true</code>, <code>on</code>, <code>yes</code>, <code>false</code>, <code>off</code>, <code>no</code> (case-sensitive).</li> <li><code>UInt</code> — accepts any unsigned - integer that fits in 63 [sic] bits, written in decimal or <code>0x</code>-prefixed hexadecimal. + integer that fits in 63 [sic] bits, written in decimal or <code>0x</code> or <code>0X</code>-prefixed hexadecimal. A leading <code>+</code> is permitted, but <code>-0</code> is not. Only 63 bits are allowed to support languages (Java) with no 64-bit unsigned integers.</li> <li><code>Int</code> — accepts any (two’s complement) signed integer that fits in 64 bits, - written in decimal or <code>0x</code>-prefixed hexadecimal. + written in decimal or <code>0x</code> or <code>0X</code>-prefixed hexadecimal. A leading <code>+</code> (or, of course, <code>-</code>) is permitted.</li> <li><code>Float</code> — - A floating-point number, written ordinarily (e.g. <code>-1.234</code>, <code>7.</code>, <code>265</code>) or in scientific notation + A floating-point number, written in ordinary decimal (e.g. <code>-1.234</code>, <code>7.</code>, <code>265</code>) or in scientific notation (e.g. <code>3e5</code>, <code>3.E-5</code>, <code>-3.7e+5</code>). A leading <code>+</code> (or, of course, <code>-</code>) is permitted. <li><code>'</code><i>value</i><code>'</code> — accepts the literal value <i>value</i>. Note that this must be written like @@ -529,6 +529,11 @@ which contains a key <i>x</i> matching <i>j</i><code>.*</code> must also contain Returns whether <code>key</code> is associated with any value. </li> <li> + <code>location(conf: Configuration, key: String) -> Optional<Location></code><br> + Location of the definition of <code>key</code> in the configuration (file and line number). + Useful for reporting invalid values when the value format is more complicated than integer/float/boolean. + </li> + <li> <code>get(conf: Configuration, key: String) -> Optional<String></code><br> Get value associated with <code>key</code>, if any exists. </li> @@ -554,7 +559,8 @@ which contains a key <i>x</i> matching <i>j</i><code>.*</code> must also contain <code>get_float(conf: Configuration, key: String) -> Optional<Float></code><br> <code>get_float_or_default(conf: Configuration, key: String, default: Float) -> Float</code><br> Get value associated with <code>key</code>, if any exists, and parse it as a 64-bit IEEE-754 double precision - floating-point number (returning <code>default</code> if the key doesn’t exist). + floating-point number, following the description of the <code>Float</code> schema type above + (returning <code>default</code> if the key doesn’t exist). Returns an error if the key exists but its value is not a valid floating-point number. </li> <li> |