Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-23244

Example of built-in ROUND incorrect in ECL Ref manual.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.6.8
    • Fix Version/s: 7.6.18
    • Component/s: Documentation
    • Labels:
      None

      Description

      The example of setting up 'MyVal2' in incorrect:

      SomeRealValue1 := 3.14159;
      INTEGER4 MyVal1 := ROUND(SomeRealValue1); // MyVal1 is 3
      INTEGER4 MyVal2 := ROUND(SomeRealValue1,2); // MyVal2 is 3.14
      SomeRealValue2 := 3.5;
      INTEGER4 MyVal3 := ROUND(SomeRealValue2); // MyVal is 4
      SomeRealValue3 := -1.3;
      INTEGER4 MyVal4 := ROUND(SomeRealValue3); // MyVal is -1
      SomeRealValue4 := -1.8;
      INTEGER4 MyVal5 := ROUND(SomeRealValue4); // MyVal is -2
      
      

      Being an INTEGER4 MyVal2 can never be 3.14

        Attachments

          Activity

            People

            • Assignee:
              jamesdefabia Jim DeFabia
              Reporter:
              allan Allan Francis Wrobel
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: