Community
Participate
Working Groups
Given the following EGL Source: decimalType decimal?; syslib.writeStdout("decimalType " + decimalType); The following is printed at runtime for Java: decimalType The + operator for EString does not support null values: /** * {@Operation +} Concatenates two strings. */ static function $Plus(lvalue EString in, rvalue EString in) returns(EString) {@Operation{"+"}}; I believe this should throw an NVE at runtime.
Add Jeff to CCList, because JavaGen also has this problem. I think the problem is int the Decimal? to String conversion, NPV should be thrown in the conversion.
Hi Jeff, I think the problem should be in the reorg process. In the following egl code: syslib.writeStdout("decimalType " + decimalType); decimalType is reorged to an AsExpression whose isNullable is true. I think it should be false.
Jeff, I talked with Tim about this, and he agrees that an NVE should be thrown for this code. Do you agree w/ Ji Yong's assessment in comment 1 or 2?
It's not so simple. This boils down to an asString operation. I think we should be consistent. There are also asInt, asDecimal, etc etc ... should these all handle this in the same way? I thinks they should, but that would also mean that concatenating anything to a string will always throw a NVE. If that is acceptable, then fine, but I don't believe that is really what is wanted.
(In reply to comment #4) > It's not so simple. This boils down to an asString operation. I think we should > be consistent. There are also asInt, asDecimal, etc etc ... should these all > handle this in the same way? I thinks they should, but that would also mean > that concatenating anything to a string will always throw a NVE. If that is > acceptable, then fine, but I don't believe that is really what is wanted. Hi Jeff, Is it possible to differentiate asUnNullableString() and asNullableString? The same for the other types.
I talked with Matt about this issue, and he believes that the ESTRING PLUS and CONCAT operators were defined before we fully understood how nulls would work in EDT, and that we should add '?' to the parameters of these function signatures so that a null value is converted to "" at runtime. Paul Harmon, can you update the EString signature and rebuild the EGLAR?
I have updated EString.egl and rebuilt the eglar
Verified in 0.8.0.v201201120902-1CT-Fiv5_M5_LM5fUa4