[gcalctool] Fix up documentation for user-defined functions



commit 5ef567aa365313594a285bedbb9d5c3c5b030f2e
Author: Robert Ancell <robert ancell gmail com>
Date:   Mon Jul 27 11:38:05 2009 +1000

    Fix up documentation for user-defined functions

 help/C/gcalctool.xml    |    6 +++---
 src/mp-equation-lexer.l |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/help/C/gcalctool.xml b/help/C/gcalctool.xml
index e2955c1..c058eaa 100644
--- a/help/C/gcalctool.xml
+++ b/help/C/gcalctool.xml
@@ -1609,7 +1609,7 @@ To change the sign of the exponent (the power to which the number is raised) use
     </sect3>
     <sect3 id="gcalctool-edit-func"> 
       <title>To Use Functions</title> 
-      <para>To show the available functions, click <guibutton>Fun</guibutton>. A popup menu displays the list of defined functions. Select a function from the menu to run that function. If the function is not defined, the value zero is returned. </para>
+      <para>To show the available functions, click <guibutton>Fun</guibutton>. A popup menu displays the list of defined functions. Select a function from the menu to run that function.</para>
 <para>If you use the keyboard shortcut <keycap>F</keycap>, you can use the keyboard to specify the function, as shown in the following example:
 </para>
       <informaltable frame="all">
@@ -1643,10 +1643,10 @@ To change the sign of the exponent (the power to which the number is raised) use
       <para>In the <guilabel>Edit Functions</guilabel> dialog, select a blank entry, or the function that you want to overwrite.</para>
         </listitem>
         <listitem>
-      <para>Click on the Value field, then enter the new value. Use the keyboard shortcuts to invoke a &app; button. For example, enter <literal>90K</literal> to calculate sine(90).</para>
+      <para>Click on the Value field, then enter the new equation to solve. You can use "ans" for the result of the previous equation and "R5" for register 5 etc. For example, enter <literal>(-R1+sqrt(R1^2-4*R0*R2))/(2*R0)</literal> to calculate a root of the quadratic equation R0*x^2 + R1*x + R2 = 0.</para>
         </listitem>
         <listitem>
-      <para>Click on the Description field, then enter the new description. For example, <literal>Sine 90</literal>.</para>
+      <para>Click on the Description field, then enter the new description. For example, <literal>Quadratic Solver</literal>.</para>
         </listitem>
         <listitem>
       <para>Click <guibutton>OK</guibutton> to save your changes and close the <guilabel>Edit Functions</guilabel> dialog.</para>
diff --git a/src/mp-equation-lexer.l b/src/mp-equation-lexer.l
index 4dcf260..b8a4c89 100644
--- a/src/mp-equation-lexer.l
+++ b/src/mp-equation-lexer.l
@@ -98,7 +98,7 @@ BIN_NUM {BIN}+|{BIN}*{DECIMAL}{BIN}+
 SUP_NUM  {SUPER_DIGITS}+
 SUB_NUM  {SUB_DIGITS}+
 GREEKS   "α"|"β"|"γ"|"δ"|"ε"|"ζ"|"η"|"θ"|"ι"|"κ"|"λ"|"μ"|"ν"|"ξ"|"ο"|"Ï?"|"Ï?"|"Ï?"|"Ï?"|"Ï?"|"Ï?"|"Ï?"|"Ï?"|"Ï?"|"Ï?"
-REGISTERS "Râ??"|"Râ??"|"Râ??"|"Râ??"|"Râ??"|"Râ??"|"Râ??"|"Râ??"|"Râ??"|"Râ??"
+REGISTERS "R0"|"R1"|"R2"|"R3"|"R4"|"R5"|"R6"|"R7"|"R8"|"R9"
 ANS       [aA][nN][sS]
 VARIABLE {REGISTERS}|{GREEKS}|"e"|{ANS}
 VARIABLE_NAME [a-zA-Z]+



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