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


Help: OASIS Mailing Lists Help | MarkMail Help

office message

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

Subject: [OASIS Issue Tracker] Commented: (OFFICE-2332) Logical Numbermaterial appears under Logical Boolean

    [ http://tools.oasis-open.org/issues/browse/OFFICE-2332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17568#action_17568 ] 

Dennis Hamilton commented on OFFICE-2332:

I think it might be more consistent to not mess with subtype of number and consider what it would take to keep Logical as a clean type.  (Or even not have it at all.)

With the distinct Logical type, it can still be presumed that there is automatic conversion everywhere within an evaluator so that when a Number is expected a 0/1 shows up and where a logical is expected an (x<>0) is implicit, given a Number type value x.

If the setting of a formula requires a Number type and there is no provision for a Logical type representtion in the OpenFormula-hosting speicfication, then logical values won't be seen and the effect will be as if a conversion of the result to a Number type (and from a Number type in handling references) always occurs.  So we don't have to talk about TRUE() and FALSE() returning anything but logical values, although they might always be seen as 1 and 0 by users of an implementation.

Whether an implementation actually uses Number values throughout an evaluation is simply invisible.

That's all from first principles.  However, the reality is more complicated

I think the tricky edge cases have to do with ISNUMBER, ISLOGICAL, in the rules for Number Sequences, and with conversion to text strings and how there might be distnict strings for text forms of logical values. 

 It would be great to have these work in some sort of harmonious way but I am not sure how that can be squared with existing implementations and the discussion about that in 3.5.  That takes more thought.   

Some speculative thinking: I note that, in most cases, these questions depend on what references resolve to, and implementations could give interoperable treatment whether or not the OpenFormula hosting supports a separate logical type or not.  (One problem is if hostings assert the type of the accepted and returned value based on formatting information rather than an explicit type assertion.  If explicit type information over-rides formatting-implied type, interchange could still work, although hosting implementations that have no logical type would need to consume such cells as if Number type were explicit and always produce such cells as Number type so Logical-supporting consumers would never achieve a different result..  In such processors, it might be more appropriate for ISLOGICAL to always return FALSE() [!] or, possibly even always return an error condition.   

I suspect this horse has already left the stable, though.

> Logical Number material appears under Logical Boolean
> -----------------------------------------------------
>                 Key: OFFICE-2332
>                 URL: http://tools.oasis-open.org/issues/browse/OFFICE-2332
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: Bug
>          Components: OpenFormula
>    Affects Versions: ODF 1.2 Part 2 CD 1
>            Reporter: Patrick Durusau
>            Assignee: Patrick Durusau
> Logical Boolean now includes:
> ***
> Logical values may be implemented as a distinct, distinguishable type from numbers, so that ISNUMBER(TRUE()) and ISLOGICAL(1) evaluates to FALSE(). However, logical values may also be implemented as a subtype of Number, where TRUE() simply returns 1 and FALSE() simply returns 0. Note that due to the implicit conversion operator "Number to Logical" (discussed below), when a number is passed as a condition, 0 is considered False and all other numeric values are considered True.
> ***
> Should appear as subtype of number.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


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