# Re: lexical value of decimal type

From: Ashok Malhotra <petsa@us.ibm.com>
Date: Wed, 24 Jan 2001 17:02:59 -0500
To: "K.Kawaguchi" <k-kawa@bigfoot.com>

Message-ID: <OFC560D4C9.0A787740-ON852569DE.0078FB5F@pok.ibm.com>
```
See comments below prefixed by AM>>

All the best, Ashok

"K.Kawaguchi" <k-kawa@bigfoot.com>@w3.org on 01/24/2001 04:17:07 PM

cc:
Subject:  lexical value of decimal type

spec says

> 3.2.5.1 Lexical representation
> decimal has a lexical representation consisting of a finite-length
> sequence of decimal digits (#x30-#x39) separated by a period as a
> decimal indicator, in accordance with the scale and precision facets,
> with an optional leading sign. If the sign is omitted, "+" is assumed.
> Leading and trailing zeroes are optional. If the fractional part is
> zero, the period and following zero(es) can be omitted.
> For example: -1.23, 12678967.543233, +100000.00.

I have a problem understanding what exactly this "decimal digits separated
by a period" means.

So let me ask some quick questions.

Is ".001" a valid decimal?  AM>> Yes
Is "100." a valid decimal?  AM>> Yes
(if "separation" allows 0-length, it should be valid)

If so, then ".000" is also a valid decimal. Is this correct?  AM>> Yes

If so, by applying a rule (the fracional part is zero, the period and
following zeroes can be omitted), "" is also a valid decimal, which
means 0. Is this correct?   AM>> No, that is not valid.

And by the adding optional leading sign, "+" is another valid decimal
that means 0. Is this correct?  AM>> No, that is not valid.

I really hope BNF of every datatype will be attached to the
recommendation spec. Sometimes, natural language is not accurate enough.

regards,
----------------------
K.Kawaguchi
E-Mail: k-kawa@bigfoot.com
```
Received on Wednesday, 24 January 2001 17:03:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:49 GMT