Community
Participate
Working Groups
I'm getting three different behaviors when I run my java program that assigns a decimal literal to variables of type smallint, int and bigint. I get three different results. SmallInt - overflow exception Int - truncates and set the variable BigInt - java object exception I assume EDT should work like RBD and have all three types behave like INT. Program: program driver type BasicProgram {} function main() try smallTest(); onException(oops NumericOverflowException) syslib.writeStdout(" Overflow Exception "); syslib.writestdout("done small"); onException(oops AnyException) syslib.writeStdout(" Exception " + oops.message); syslib.writestdout("done small"); end regularTest(); try bigTest(); onException(oops NumericOverflowException) syslib.writeStdout(" Overflow Exception "); syslib.writestdout("done small"); onException(oops AnyException) syslib.writeStdout(" Exception " + oops.message); syslib.writestdout("done big"); end end function bigTest() syslib.writestdout("start big"); var4 bigint = 234.4; var3 bigint = 234.5; syslib.writestdout("done big"); end function regularTest() syslib.writestdout("start regular"); var2 int = 435; var4 int = 234.4; var3 int = 234.5; syslib.writestdout("done regular"); end function smallTest() syslib.writestdout("start small"); var2 smallInt = 435; var4 smallInt = 234.4; var3 smallInt = 234.5; syslib.writestdout("done small"); end end
fixed
I tried with the install build 201109150902. The bigTest is getting type mismatch java compile errors. Is the test code provided vailid?
It still works perfectly for me. I'm on the latest software for all plugins. I had to modify the testcase to put the regularTest inside of a try block, but here's the results: start small Overflow Exception done small start regular Overflow Exception done small start big Overflow Exception done small
Closing this defect.