Bug #2326
Reference to the extent value of a field is emitted as a constant
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
06/29/2014
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
History
#1 Updated by Hynek Cihlar about 10 years ago
- Subject changed from Extent value of a field is emmitted as a constant to Extent value of a field is emitted as a constant
The 4GL code
if extent(f) <> ? then message "ERR f <> ?".
gets converted to
if (_notUnknown(2)) { message("ERR f <> ?"); }
where f is defined as an extent of size 2, i.e. field f as int extent 2
.
Similarly
if extent(f) <> 2 then message "ERR f <> 2".
is converted to
if (_isNotEqual(2, 2)) { message("ERR f <> 2"); }
Note that in the former case, the emitted Java code fails to compile.
#2 Updated by Hynek Cihlar about 10 years ago
- Subject changed from Extent value of a field is emitted as a constant to Reference to the extent value of a field is emitted as a constant
#3 Updated by Hynek Cihlar about 10 years ago
If I am correct, fields can be declared as determinate extents only (with a constant extent size) hence this issue may not be of such a concern.
#4 Updated by Constantin Asofiei about 10 years ago
Hynek Cihlar wrote:
If I am correct, fields can be declared as determinate extents only (with a constant extent size) hence this issue may not be of such a concern.
Yes, fields can't have a dynamic extent. Our current approach (as you observed) is to emit the field's extent as a constant.
#5 Updated by Greg Shah about 10 years ago
- Project changed from Base Language to Database
This task is related to database conversion more than base language.
It does not need to be worked on right now.