To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=74147 Issue #|74147 Summary|Mod with Currency generates type mismatch Component|framework Version|OOo 2.1 Platform|PC URL| OS/Version|Windows XP Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|scripting Assigned to|npower Reported by|catkin
------- Additional comments from [EMAIL PROTECTED] Sat Feb 3 05:34:56 +0000 2007 ------- Sub Main Dim i As Integer Dim cCur As Currency cCur = 1 i = cCur Mod 2 ' When run within a .ods file under OOo 2.1 under WXP Pro SP2 the above ' generates error "Inadmissible value or data type. Data type mismatch" ' According to the online help: ' Mod Operator [Runtime] ' Returns the integer remainder of a division. ' Syntax: ' Result = Expression1 MOD Expression2 ' Return value: ' Integer ' Parameters: ' Result: Any numeric variable that contains the result of the MOD operation. ' Expression1, Expression2: Any numeric expressions that you want to divide. ' Both cCur and 16 are numeric expressions ' The integer result should be coerced to type Currency by the = (assignment). ' cCur = cCur Mod 2 generates the same error message ' The following snippets work OK Dim d As Double i = 2 cCur = i ' Demostrates coercion by the = (assignment) d = 1984374978.247863413 cCur = d Mod 16 ' Demonstrates issue is not float vs. integer around Mod End Sub --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]