From 368dbbfc70b160418dd92027edce0715bf4dbafa Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 7 Sep 2025 17:37:44 -0400 Subject: Minor revisions to spec --- site/spec.html | 14 ++++++++++---- 1 file 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
  • Bool — accepts true, on, yes, false, off, no (case-sensitive).
  • UInt — accepts any unsigned - integer that fits in 63 [sic] bits, written in decimal or 0x-prefixed hexadecimal. + integer that fits in 63 [sic] bits, written in decimal or 0x or 0X-prefixed hexadecimal. A leading + is permitted, but -0 is not. Only 63 bits are allowed to support languages (Java) with no 64-bit unsigned integers.
  • Int — accepts any (two’s complement) signed integer that fits in 64 bits, - written in decimal or 0x-prefixed hexadecimal. + written in decimal or 0x or 0X-prefixed hexadecimal. A leading + (or, of course, -) is permitted.
  • Float — - A floating-point number, written ordinarily (e.g. -1.234, 7., 265) or in scientific notation + A floating-point number, written in ordinary decimal (e.g. -1.234, 7., 265) or in scientific notation (e.g. 3e5, 3.E-5, -3.7e+5). A leading + (or, of course, -) is permitted.
  • 'value' — accepts the literal value value. Note that this must be written like @@ -528,6 +528,11 @@ which contains a key x matching j.* must also contain has(conf: Configuration, key: String) -> Bool
    Returns whether key is associated with any value.
  • +
  • + location(conf: Configuration, key: String) -> Optional<Location>
    + Location of the definition of key in the configuration (file and line number). + Useful for reporting invalid values when the value format is more complicated than integer/float/boolean. +
  • get(conf: Configuration, key: String) -> Optional<String>
    Get value associated with key, if any exists. @@ -554,7 +559,8 @@ which contains a key x matching j.* must also contain get_float(conf: Configuration, key: String) -> Optional<Float>
    get_float_or_default(conf: Configuration, key: String, default: Float) -> Float
    Get value associated with key, if any exists, and parse it as a 64-bit IEEE-754 double precision - floating-point number (returning default if the key doesn’t exist). + floating-point number, following the description of the Float schema type above + (returning default if the key doesn’t exist). Returns an error if the key exists but its value is not a valid floating-point number.
  • -- cgit v1.2.3