Issue 82588 - iif function seems to evaluate both possible return values before deciding
Summary: iif function seems to evaluate both possible return values before deciding
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: ab
QA Contact: Unknown
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-13 20:43 UTC by mchris
Modified: 2013-02-24 21:01 UTC (History)
2 users (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 mchris 2007-10-13 20:43:05 UTC
iif function seems to evaluate both possible return values before deciding what
to return. For example the following code:

x=10
y=0
print iif ( y<>0, x/y, "error")

creates a "Division by Zero" runtime error instead of printing "error".
Comment 1 kay.ramme 2007-10-29 10:54:22 UTC
Isn't that "works as designed" ? 

Anyway, Andreas could you take this over?

Thanks

      Kay
Comment 2 ab 2007-11-15 11:47:11 UTC
ab->kr: Right, "works as designed", VB6 behaves in the same way
-> INVALID
Comment 3 Mechtilde 2008-11-06 13:47:51 UTC
close the invalid issue