Issue 6282 - BASIC function returns wrong result
Summary: BASIC function returns wrong result
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: Other Windows 98
: P2 Trivial
Target Milestone: ---
Assignee: ab
QA Contact: Unknown
URL: http://www.foerst.info/ooo
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-04 10:37 UTC by kf
Modified: 2013-02-24 21:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description kf 2002-07-04 10:37:05 UTC
I think this is a severe defect: The spreadsheet looks right, but some values are wrong. We have 
been using our own tax calculation functions in StarOffice 4.0 and 5.2, but they do not run 
reliably in OOO 1.0.0 (all German). On every PC, we store the functions in 
C:\Programme\OpenOffice.org1.0\user\basic\Standard\Module1.xba. We call them directly 
from a cell of a spreadsheet. Sometimes they run properly. But sometimes they return a WRONG 
result, that obviously is derived from an older value of another cell.  Somehow, the spreadsheet 
application doesn't notice that a value of the other cell has changed and supplies the tax 
function with an outdated parameter.

This problem does not arise when the function is 
stored in the spreadsheet itself rather than centrally.

Apart from that, I am deeply 
impressed with what level of stability OpenOffice has achieved so far. 

Dr. Klaus Foerst, 
tax consultant, Flensburg, Germany
Comment 1 frank 2002-07-04 13:33:32 UTC
set the flags for scripting.

Frank
Comment 2 kay.ramme 2002-07-05 08:18:13 UTC
Andreas, please have a look at this...
Comment 3 ab 2002-07-09 08:12:29 UTC
I could reproduce the problem but the Basic always returns the correct result (cheched by adding some print commands in Basic). The problem seems to be that the spreadsheet document doesn't always adopt the result. Niklas should check this.
Comment 4 niklas.nebel 2002-07-09 19:22:02 UTC
No, the line "SPLITTINGTARIF2001 = ZwiWert" doesn't work after the
second call. The function SPLITTINGTARIF2001 is of type Long, the
variable ZwiWert of type Single. Apparently, the SbMethod's SBX_FIXED
flag is reset from SbxVariable::Broadcast, so its type is changed and
on subsequent calls the function can't be assigned the result.
Comment 5 ab 2002-10-09 10:14:03 UTC
I can reproduce the behaviour
Comment 6 ab 2002-12-06 13:08:04 UTC
Fixed in sbxmod.cxx 1.11
Comment 7 ab 2005-04-06 11:38:04 UTC
Closed
Comment 8 ab 2005-04-06 11:56:16 UTC
.