OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Updated: (ODATA-566) 6.2.4 Attribute Scale: clarify allowed range of Scale values


     [ http://tools.oasis-open.org/issues/browse/ODATA-566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-566:
-----------------------------

    Proposal: 
Change text to

    A decimal property MAY define a non-negative integer value or the value variable for the Scale attribute. 
    This attribute specifies the maximum number of digits allowed to the right of the decimal point. 
    The value variable means that the number of digits to the right of the decimal point may vary from zero to the value of the Precision attribute minus one (at least one digit is required to the left of the decimal point).
    An integer value means that the number of digits to the right of the decimal point may vary from zero to the value of the Scale attribute, and the number of digits to the left of the decimal point may vary from one to the value of the Precision attribute minus the value of the Scale attribute.
    The value of the Scale attribute MUST be less than the value of the Precision attribute.

Examples:
  <Property Name="Amount" Precision="3" Scale="2" /> 
  allowed Values: 1.23, 0.23, 3.14, 0.7 
  not allowed values: 123, 12.3

  <Property Name="Amount" Precision="2" Scale="2" /> 
  not allowed, because .23 is not allowed anymore and  0.23 needs precision 3

  <Property Name="Amount" Precision="3" Scale="variable" /> 
  allowed Values: 1.23, 0.23, 0.7, 123, 12.3
  not allowed values: 12.34, 1234, 123.4


  was:
Change text to

    A decimal property MAY define a non-negative integer value or the value {{variable}} for the Scale attribute. 
    This attribute specifies the maximum number of digits allowed to the right of the decimal point. 
    The value variable means that the number of digits to the right of the decimal point may vary from zero to the value of the Precision attribute minus one (at least one digit is required to the left of the decimal point).
    An integer value means that the number of digits to the right of the decimal point may vary from zero to the value of the Scale attribute, and the number of digits to the left of the decimal point may vary from one to the value of the Precision attribute minus the value of the Scale attribute.
    The value of the Scale attribute MUST be less than the value of the Precision attribute.

Examples:
  <Property Name="Amount" Precision="3" Scale="2" /> 
  allowed Values: 1.23, 0.23, 3.14, 0.7 
  not allowed values: 123, 12.3

  <Property Name="Amount" Precision="2" Scale="2" /> 
  not allowed, because .23 is not allowed anymore and  0.23 needs precision 3

  <Property Name="Amount" Precision="3" Scale="variable" /> 
  allowed Values: 1.23, 0.23, 0.7, 123, 12.3
  not allowed values: 12.34, 1234, 123.4



> 6.2.4 Attribute Scale: clarify allowed range of Scale values
> ------------------------------------------------------------
>
>                 Key: ODATA-566
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-566
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Bug
>          Components: OData CSDL
>    Affects Versions: V4.0_CS02
>            Reporter: Ralf Handl
>             Fix For: V4.0_ERRATA01
>
>
> The current text says
>     A decimal property MAY define a non-negative integer value or variable for the Scale attribute. 
>     This attribute specifies the maximum number of digits allowed to the right of the decimal point. 
>     The value variable means that the number of digits to the right of the decimal point may vary from zero to the value of the Precision attribute.
>     The value of the Scale attribute MUST be less than or equal to the value of the Precision attribute.
> Unfortunately this conflicts with the ABNF rule decimalValue that makes the fractional part optional but requires at least one digit in the integer part, so if Precision limits the number of digits to e.g. 10, at most 9 digits can be to the right of the decimal point.
> Also the text does not make clear that a numeric Scale value implies a fixed-point number with Scale fractional digits and Precision-Scale integer digits, and that the only variability is to remove leading zeroes from the integer part and trailing zeroes from the fractional part.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]