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

Bug 359745

Summary: MathLib.decimals doesn't work
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description broy2 CLA 2011-10-03 14:08:54 EDT
program decimals type BasicProgram {}	
	myVar decimal(18,6);	
	results int;
	function main()
		results = MathLib.decimals(myVar);
		SysLib.writeStdout(results);
	end	
end

Returns 0.
Should return 6.
Comment 1 broy2 CLA 2011-10-03 17:45:45 EDT
The mathLib.decimals() system function returns the number of decimal places with which a numeric variable was defined.

Defined is the key word.
Comment 2 Jeff Douglas CLA 2011-10-04 09:34:01 EDT
Yes, this is true. It's because the BigDecimal is being passed to the function instead of EDecimal. 

The same problem will exist for MathLib.precision for decimal fields.
Comment 3 Jeff Douglas CLA 2011-10-04 11:24:16 EDT

*** This bug has been marked as a duplicate of bug 359857 ***
Comment 4 broy2 CLA 2011-10-04 11:50:36 EDT
Dude, you shouldn't mark an earlier defect as a duplicate of a defect you just opened.
And let me close my defects even when they're duplicates please.
When you close the defect, it doesn't show in my list to verify.
So I'm reopening this one so I'll remember to test it when it's fixed.
Comment 5 Jeff Douglas CLA 2011-10-18 06:54:03 EDT
FYI Brenda. When a defect gets marked as a duplicate, it is Bugzilla (and not me) that closes it.
Comment 6 broy2 CLA 2011-10-31 19:19:07 EDT
Verified in 20111031 build.