[gnumeric] fix array function example



commit c6af5c9f0aab3fa76cb470cda6893674f9781d6c
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Dec 7 09:17:26 2011 -0700

    fix array function example
    
    2011-12-07  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* data-types.xml: fix example

 doc/C/ChangeLog      |    4 ++++
 doc/C/data-types.xml |   12 ++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/doc/C/ChangeLog b/doc/C/ChangeLog
index 2baa763..2c0b523 100644
--- a/doc/C/ChangeLog
+++ b/doc/C/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-07  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* data-types.xml: fix example
+
 2011-12-03  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* data-types.xml: fix typo
diff --git a/doc/C/data-types.xml b/doc/C/data-types.xml
index 8eaf29d..ea1e66f 100644
--- a/doc/C/data-types.xml
+++ b/doc/C/data-types.xml
@@ -867,13 +867,17 @@ FUNCTIONNAME(ARGUMENTS)
      function <code>DMEDIAN</code> one can use the alternative expression 
      <code>median(if(A1:A20="AA",B1:B20))</code> entered as an array function as described in 
      <xref linkend="sect-data-formulas-array" />. Multiple conditions can be combined using
-     the <code>AND</code> or <code>OR</code> functions as in 
-     <code>median(if(OR(A1:A20="AA",A1:A20="BB"),B1:B20))</code>.
+     multiplication to obtain <code>AND</code> and addition to obtain <code>OR</code> as in 
+     <code>median(if((A1:A20="AA")+(C1:C20="BB"),B1:B20))</code>.
      Using defined names as introduced in <xref linkend="sect-data-formulas-names" /> for 
      <code>A1:A20</code> and <code>B1:B20</code> can make this code very flexible and readable.
-   </para> 
+   </para>
  </example>
-  
+     <note><para>
+     In this case we can not use use <code>if(OR(A1:A20="AA",C1:C20="BB"),...)</code> since the
+     OR function would be applied to all 40 equality tests rather than each of the 20 pairs of equality tests.
+   </para></note>
+
   <figure id="dmedian-example-1">
     <title>Calculating the MEDIAN of Some Data Values</title>
     <screenshot>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]