Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359304

Summary: Conversion from float to decimal doesn't give expected results
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-09-28 16:48:43 EDT
This works in RBD.  I expect to see works twice in console

program driver type BasicProgram {}
	function main()
		actual float = 2.539E7;
		actualDec decimal(15,2) = actual;
		expectedDec decimal(15,2) = 25390000;
		if (actualDec == expectedDec)
			syslib.writestdout("works");
		else
			syslib.writestdout("doesnt");
		end
		actualDec = actual as decimal(15,2);
		if (actualDec == expectedDec)
			syslib.writestdout("works");
		else
			syslib.writestdout("doesnt");
		end		
	end
end
Comment 1 Justin Spadea CLA 2011-09-28 19:57:29 EDT
Reassigning to JavaGen.
Comment 2 Jeff Douglas CLA 2011-09-29 08:19:09 EDT
fixed
Comment 3 Kathy Carroll CLA 2011-10-12 13:36:02 EDT
verified build 201110120952