Summary: | Instruction Cint fails when converting Hex strings of a negative value to a 16-bit integer value. | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | irs <irsbugs> |
Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | jmadero.dev, qubit |
Version: | 3.3.0 release | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
irs
2013-03-14 08:45:54 UTC
As you have stated the bug existed in an older release I am updating version. Our version field represents the oldest release we see the problem, not the latest it's been tested on - we use comments to say "still exists in version x.x.x.x). Thanks! Hi Joel, Thanks for explaining the "Version" field in Bug header section and correcting it to refect the first LibreOffice version release of V3.3.0. Cheers, Ian. TESTING on LO 4.2.0.0.beta2 on Ubuntu 12.04.3 (In reply to comment #0) > Repro steps: 1) Open LO Writer 2) Tools -> Macros -> Organize Macros -> LibreOffice Basic 3) Click on 'Untitled 1', then the 'New' button 4) In the code window that appears, dump the BASIC code (Comment 0) into the file above the opening of the Main sub. 5) Inside the Main sub, call the function; Sub Main Example_Code_For_Integer() End Sub 6) Run the code (F5) Result: See dialog box: "Cint(&H0): 0" with OK button 7) click the OK button Result: See dialog box: "Cint(&H7FFF): 32767" with OK button 8) click the OK button Result: See dialog box: "Inadmissible value or data type.\nOverflow." (At this point program execution ended, so we didn't see the last msgBox) > Program execution is halted and the error message displayed is: > “Inadmissible value or data type. Overflow”. Yep. It's not clear to me if this behavior is as-expected, or is a bug. > If the same BASIC code is run on Visual Basic V6.0 or the Visual Basic V6.5 > included with MS Office 2003, then it executes without errors. > Interoperability is a strong reason to try to accept this input, even if it does take some development and testing. (In reply to comment #3) > TESTING on LO 4.2.0.0.beta2 on Ubuntu 12.04.3 > > Program execution is halted and the error message displayed is: > > “Inadmissible value or data type. Overflow”. > > Yep. > > It's not clear to me if this behavior is as-expected, or is a bug. > > > If the same BASIC code is run on Visual Basic V6.0 or the Visual Basic V6.5 > > included with MS Office 2003, then it executes without errors. > > > > Interoperability is a strong reason to try to accept this input, even if it > does take some development and testing. Hi Qubit, I am pleased you can reproduce the "bug". From my latest testing using Linux (64-bit) 3.11.0-15-generic and LibreOffice 4.1.3.2 410m0(Build:2) this Cint() problem still exists. Please note that this bug regarding the BASIC function Cint() is similar to Bug 62323 which concerned the BASIC function Clng(). Noel Power fixed the problem with Clng() converting negative hex strings by patching /basic/source/comp/scanner.cxx. Maybe additional patching to this scanner.cxx file may fix the problem. regards, Ian. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.