Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359745 - MathLib.decimals doesn't work
Summary: MathLib.decimals doesn't work
Status: CLOSED DUPLICATE of bug 359857
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 14:08 EDT by broy2 CLA
Modified: 2017-02-23 14:19 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.