Project

General

Profile

Bug #2250

Conversion error when decimal precision defined on dynamic extent variable

Added by Hynek Cihlar about 10 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
02/27/2014
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:

hc_upd20140426a.zip (13.6 KB) Hynek Cihlar, 04/26/2014 05:23 PM

History

#1 Updated by Hynek Cihlar about 10 years ago

Setting decimal precision in the DEFINE VARIABLE statement of an EXTENT with the missing number of array elements produces uncompilable Java code.

Example:

def var d1 as decimal extent decimals 1 init [1, 2, 3, 4, 5].
def var d2 as decimal extent 5 decimals 2 init [5,4,3,2,1].
def var d3 as decimal extent decimals 3.
def var d4 as decimal extent 1 decimals 4.
def var d5 like d1.
def var d6 like d2.

yields the following Java code (only relevant part shown):

         public void init()
         {
            ArrayAssigner.registerDynamicArray(d1);
            d1.setPrecision(1); // ERROR
            TransactionManager.register((Object) d1, (Object) d2, (Object) d3, (Object) d4, (Object) d5, (Object) d6);
            decimal.setPrecision(d2, 2);
            assignMulti(d3, new decimal(0));
            ArrayAssigner.registerDynamicArray(d3);
            d3.setPrecision(3); // ERROR
            assignMulti(d4, new decimal(0));
            decimal.setPrecision(d4, 4);
            ArrayAssigner.registerDynamicArray(d5);
            d5.setPrecision(1); // ERROR
            decimal.setPrecision(d6, 2);
         }

#2 Updated by Greg Shah about 10 years ago

  • Assignee set to Hynek Cihlar
  • Target version set to Milestone 11

#3 Updated by Hynek Cihlar almost 10 years ago

Please review.

#4 Updated by Hynek Cihlar almost 10 years ago

  • Status changed from New to Feedback

#5 Updated by Constantin Asofiei almost 10 years ago

The change looks good, assuming it fixes the cases at note 1.

#6 Updated by Hynek Cihlar almost 10 years ago

I accidentally fixed this issue in the issue #2294. This can be closed now.

#7 Updated by Hynek Cihlar almost 10 years ago

  • % Done changed from 0 to 100

#8 Updated by Greg Shah almost 10 years ago

  • Status changed from Feedback to Closed

#9 Updated by Greg Shah over 7 years ago

  • Target version changed from Milestone 11 to Cleanup and Stablization for Server Features

Also available in: Atom PDF