[gnumeric] Help: add a few examples.



commit 7f77e86cef6d00221ce2bc9ad8e8e85ac402d37b
Author: Morten Welinder <terra gnome org>
Date:   Sun Aug 16 20:38:15 2009 -0400

    Help: add a few examples.

 plugins/fn-logical/functions.c |    3 +++
 plugins/fn-math/functions.c    |    1 +
 src/func-builtin.c             |    1 +
 3 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/fn-logical/functions.c b/plugins/fn-logical/functions.c
index ed7218c..046a79b 100644
--- a/plugins/fn-logical/functions.c
+++ b/plugins/fn-logical/functions.c
@@ -231,6 +231,7 @@ static GnmFuncHelp const help_iferror[] = {
 	{ GNM_FUNC_HELP_ARG, F_("x:value to test for error.") },
 	{ GNM_FUNC_HELP_ARG, F_("y:alternate value.") },
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("This function returns the first value, unless that is an error, in which case it returns the second.") },
+        { GNM_FUNC_HELP_EXAMPLES, "=IFERROR(1/0,14)" },
 	{ GNM_FUNC_HELP_SEEALSO, "IF,ISERROR" },
 	{ GNM_FUNC_HELP_END }
 };
@@ -247,6 +248,7 @@ static GnmFuncHelp const help_true[] = {
 	{ GNM_FUNC_HELP_NAME, F_("TRUE:the value TRUE.") },
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("TRUE returns the value TRUE.") },
 	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+        { GNM_FUNC_HELP_EXAMPLES, "=TRUE()" },
 	{ GNM_FUNC_HELP_SEEALSO, "FALSE,IF" },
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Logical_value") },
 	{ GNM_FUNC_HELP_END }
@@ -264,6 +266,7 @@ static GnmFuncHelp const help_false[] = {
 	{ GNM_FUNC_HELP_NAME, F_("FALSE:the value FALSE.") },
 	{ GNM_FUNC_HELP_DESCRIPTION, F_("FALSE returns the value FALSE.") },
 	{ GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
+        { GNM_FUNC_HELP_EXAMPLES, "=FALSE()" },
 	{ GNM_FUNC_HELP_SEEALSO, "TRUE,IF" },
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Logical_value") },
 	{ GNM_FUNC_HELP_END }
diff --git a/plugins/fn-math/functions.c b/plugins/fn-math/functions.c
index 4523703..e84552f 100644
--- a/plugins/fn-math/functions.c
+++ b/plugins/fn-math/functions.c
@@ -173,6 +173,7 @@ gnumeric_lcm (GnmFuncEvalInfo *ei, int argc, GnmExprConstPtr const *argv)
 static GnmFuncHelp const help_gd[] = {
 	{ GNM_FUNC_HELP_NAME, F_("GD:Gudermannian function")},
 	{ GNM_FUNC_HELP_ARG, F_("x:value")},
+	{ GNM_FUNC_HELP_EXAMPLES, "=GD(0.5)" },
 	{ GNM_FUNC_HELP_SEEALSO, "TAN,TANH" },
 	{ GNM_FUNC_HELP_EXTREF, F_("wolfram:Gudermannian.html") },
 	{ GNM_FUNC_HELP_EXTREF, F_("wiki:en:Gudermannian_function") },
diff --git a/src/func-builtin.c b/src/func-builtin.c
index 9e9830a..2d0fe91 100644
--- a/src/func-builtin.c
+++ b/src/func-builtin.c
@@ -260,6 +260,7 @@ static GnmFuncHelp const help_if[] = {
 	{ GNM_FUNC_HELP_ARG, N_("trueval:value to use if condition is true.") },
 	{ GNM_FUNC_HELP_ARG, N_("falseval:value to use if condition is false.") },
 	{ GNM_FUNC_HELP_DESCRIPTION, N_("This function first evaluates the condition.  If the result is true, it will then evaluate and return the second argument.  Otherwise, it will evaluate and return the last argument.") },
+        { GNM_FUNC_HELP_EXAMPLES, "=IF(1+2=3,\"x\",\"y\")" },
 	{ GNM_FUNC_HELP_SEEALSO, "AND,OR,XOR,NOT,IFERROR" },
 	{ GNM_FUNC_HELP_END }
 };



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