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

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

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


Subject: Re: [office-formula] Non-Scalar Evaluation and References


Eric,

Eric Patterson wrote:
> I think an example may be useful for discussion purposes (not for inclusion in the spec).
>
> If you put the values 1, 2, 3 in Cells A1:A3 respectively and 4,5,6 in B1:B3:
>
>         A       B
> 1       1       4
> 2       2       5
> 3       3       6
>
>
> Then put the formula =A1:A3+B1:B3 in different cells, you will see different results:
>
> In F1, Result 5
> In F2, Result 7
> In B6, Result Error
> In D7, Result Error
>
> Note: Named expressions can also use implicit intersection when defined using relative references.
>
>   
OK, but that means that the row-vector and column-vector were 
*constraints* on the "target reference" and the notion of "intersection" 
even more mis-leading.

So, what happens if the "target reference" isn't a row or column vector? 
Ah, so then it becomes a matrix.

See the post I just sent on inline arrays, references and matrices.

I can see untangling all this still has a ways to go.

Thanks!

Patrick
> -Eric
>
>
> -----Original Message-----
> From: Patrick Durusau [mailto:patrick@durusau.net]
> Sent: Tuesday, February 09, 2010 7:05 AM
> To: office-formula@lists.oasis-open.org
> Subject: [office-formula] Non-Scalar Evaluation and References
>
> Greetings!
>
> OK, to continue with non-scalar evaluations and references.
>
> A reminder, we start off with:
>
>   
>>   1.
>>
>>       Evaluation as an implicit intersection of the argument with the
>>       expression's evaluation position.
>>
>>     
> Actually that's a lie, we start with:
>
>   
>> Non-scalar values passed as arguments to functions are evaluated by
>> intersection or iteration.
>>
>>     
> Which isn't true either. Non-scalar values are either evaluated as matrices or not. No reason to invent terms.
>
> Anyway, back to non-scalar evaluation and references.
>
> Let me say the principle and see if I get that right:
>
> An expression occurs in some particular cell and that expression is a function that has a reference as its input. (OK so far?)
>
> The value returned to the function is the "intersection" of the reference with the cell where the reference occurs.
>
> If the cells specified by the reference don't intersect with the cell where the reference occurs, the value #VALUE is returned.
>
> Yes?
>
> The nature of the reference, whether row-vector or column-vector, isn't relevant.
>
> Unless the intent was to limit those references to column and row vectors but then we would have to say that wouldn't we?
>
> So I would restate References to read:
>
> ***
> If a reference is passed to a function and not evaluated as a matrix, the value at the intersection of the cell where the reference occurs with a cell in the reference, if any, is returned to the function.
>
> If there is no intersection between the cell where the reference occurs with a cell in the reference, the value #VALUE is returned. (full stop)
> ***
>
> Shorter and to my way of thinking much clearer than what we have now.
> For one thing it doesn't have all the undefined references ("evaluation position's row" for example).
>
> BTW, looking ahead, we can drop the reference to ODF 8.13 table:number-matrix-column-spanned for the more general:
>
> 2) Matrix evaluation
>
> Which makes it more general to all OpenFormula evaluators.
>
> I have to re-write the next section to not use display as the basis for the operations but that comes next.
>
> Hope everyone is having a great day!
>
> Patrick
>
> --
> Patrick Durusau
> patrick@durusau.net
> Chair, V1 - US TAG to JTC 1/SC 34
> Convener, JTC 1/SC 34/WG 3 (Topic Maps)
> Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this mail list, you must leave the OASIS TC that
> generates this mail.  Follow this link to all your TCs in OASIS at:
> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
>
>
>
>   

-- 
Patrick Durusau
patrick@durusau.net
Chair, V1 - US TAG to JTC 1/SC 34
Convener, JTC 1/SC 34/WG 3 (Topic Maps)
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300
Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)



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