[Libreoffice-bugs] [Bug 124605] The variables type Variant works by division wrong

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Apr 8 20:46:30 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=124605

--- Comment #4 from Eike Rathke <erack at redhat.com> ---
Isn't that rather a BASIC error if an expression X/100 results in 100 if X is
Empty? i.e. ignores the Variant *and* the following operator (same with X-100,
for example, the result is 100).

The same behaviour with

Dim X
Sub Main
    print X/100
End Sub

(where Dim X is a so far empty Variant) so how's that supposed to be defined?

FWIW, it can be checked with

Function foo( X )
    If IsEmpty(X) Then
        X = 0
    End If
    foo = X / 100
End Function


Or should we only put Empty if it was a cell range argument, but not for single
cells? What does Excel do?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190408/2882e801/attachment.html>


More information about the Libreoffice-bugs mailing list