lexical value of decimal type

spec says

> 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?
Is "100." a valid decimal?
  (if "separation" allows 0-length, it should be valid)

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

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?

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

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

E-Mail: k-kawa@bigfoot.com

Received on Wednesday, 24 January 2001 16:17:03 UTC