To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=112383 Issue #|112383 Summary|CLng("&HFFFFFFFF") fails on 64-bits rather than return |ing -1 Component|scripting Version|OOo 3.2.1 Platform|All URL| OS/Version|All Status|NEW Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|kr Reported by|pitonyak
------- Additional comments from piton...@openoffice.org Mon Jun 14 13:13:01 +0000 2010 ------- The current 32-bit windows versions, and on older Linux 32-bit versions (I did not check current Linux 32-bit versions), the following two lines both print -1. print &HFFFFFFFF print CLng("&HFFFFFFFF") On the 64-bit Linux version, First, I see :4294967295 Followed by:Inadmissible value or data type. Overflow. I initially posted the following probe to the dev mailing list: I do not know when the change was made, but, CLng used to be able to convert "negative" values represented as Hex, but, not in 3.20. I last tested in version 2.x. Here is my latest code to show this: Sub ExampleCLngWithHex On Error Resume Next Dim s$, i% Dim v() v() = Array("&HF", "&HFF", "&HFFF", "&HFFFF",_ "&HFFFFF", "&HFFFFFF", "&HFFFFFFF", "&HFFFFFFFF",_ "&HFFFFFFFFF",_ "&HE", "&HFE", "&HFFE", "&HFFFE",_ "&HFFFFE", "&HFFFFFE", "&HFFFFFFE", "&HFFFFFFFE",_ "&HFFFFFFFFE") For i = LBound(v()) To UBound(v()) s = s & i & " CLng(" & v(i) & ") = " s = s & CLng(v(i)) s = s & CHR$(10) Next MsgBox s End Sub This fails on CLng("&HFFFFFFFF") rather than returning -1. Add an extra F and it quietly fails internally and returns 0. Serg Bormant helped me narrow the problem to the 64-bit version. Thanks Serg! --------------------------------------------------------------------- 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: issues-unsubscr...@script.openoffice.org For additional commands, e-mail: issues-h...@script.openoffice.org --------------------------------------------------------------------- To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org