Re: Digit required before/after decimal point?

Ashok Malhotra wrote:
> Is ".1" allowed as a lexical representation of a decimal? How about
> "1."? How about for double and float?
> AM>> Yes.  For decimal as well as float and double since the mantissa
> AM>> is defined as a decimal.

Hmm. If you allow "1." for decimal, then it must also be allowed for
"integer", since the the only difference between "integer" and "decimal"
is that "integer" has scale facet equal to zero, and the "scale Valid"
validation rule says

"A value in a value space is facet-valid with respect to scale if: 
the number of decimal digits in the fractional part of the value is less
than or equal to {value};"

which is satisfied for a value of "1." and a scale of "0".

But says "integer has a lexical representation consisting of a
finite-length sequence of decimal digits (#x30-#x39) with an optional
leading sign".

This is not consistent.


Received on Monday, 5 February 2001 04:46:49 UTC