OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

# office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Test suite, and the meaning of True/False

• From: "David A. Wheeler" <dwheeler@dwheeler.com>
• To: office-formula@lists.oasis-open.org
• Date: Wed, 19 Jul 2006 11:47:14 -0400 (EDT)

```Here's a subtlety I've noticed, and how I think we should deal with it..
suggestions welcome.  It comes from how we deal with Logicals.

In the test suite, a number of expected results for a given
Expression are "True" or "False". Here are three options of
what this could mean, in order of increasing exactness:
1. IF(Expression; TRUE(); FALSE()) /
IF(Expression; FALSE(); TRUE())
2. Expression=TRUE() / Expression=FALSE()
3. AND(ISLOGICAL(Expression);Expression=TRUE()) /
AND(ISLOGICAL(Expression);Expression=FALSE())

I propose that we declare item 2 as the expected result.
That means that when we say the expression "5>2" is True,
it's NOT okay for an implementation to compute "5>2" as 12...
even though 12 would be considered True for purposes of IF.

Option 3 is very plausible as well.

I don't like option 1, it's too vague.  I don't like the idea
of permitting "5>2" to produce an arbitrary number;
if we MEAN that, we should say so.  Otherwise, formulas like
(5>2)+(7>6) could quietly produce different answers on
different systems, and we DON'T want that.

--- David A. Wheeler
```

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]