Commit 77c98efc authored by Jukka-Pekka Iivonen's avatar Jukka-Pekka Iivonen Committed by jpekka

Added examples and improved the documentation.

2001-11-06  Jukka-Pekka Iivonen  <jiivonen@hutcs.cs.hut.fi>

        * fn-*.c: Added examples and improved the documentation.
parent a3bacc8a
......@@ -462,9 +462,9 @@ filter_row:
"The first row of a database contains labels for each column. " \
"\n" \
"@field specifies which column is used in the function. If " \
"@field is an integer, i.e. 2, the second column is used. Field " \
"can also be the label of a column. For example, ``Age'' refers " \
"to the column with the label ``Age'' in @database range. " \
"@field is an integer, for example. 2, the second column is used. " \
"Field can also be the label of a column. For example, ``Age'' " \
"refers to the column with the label ``Age'' in @database range. " \
"\n" \
"@criteria is the range of cells which contains the specified " \
"conditions. The first row of a @criteria should contain the " \
......
......@@ -26,13 +26,19 @@ static char *help_date = {
"@SYNTAX=DATE (year,month,day)\n"
"@DESCRIPTION="
"Computes the number of days since the 1st of january of 1900"
"DATE returns the number of days since the 1st of january of 1900"
"(the date serial number) for the given year, month and day.\n"
"The @day might be negative (to count backwards) and it is relative "
"to the previous @month. The @years should be at least 1900."
"to the previous @month. The @years should be at least 1900. If "
"@years <= 30, it is assumed to be 2000 + @years. If 30 < "
"@years < 100, it is assumed to be 1900 + @years. "
"\n"
"If the given date is not valid, DATE returns #VALUE! error. "
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"DATE(2001, 3, 30) returns ``Mar 30, 2001''.\n "
"\n"
"@SEEALSO=TODAY, NOW")
};
......@@ -55,7 +61,7 @@ gnumeric_date (FunctionEvalInfo *ei, Value **argv)
year += 1900;
if (!g_date_valid_dmy (1, month, year))
return value_new_error (ei->pos, _("Invalid month or year"));
return value_new_error (ei->pos, gnumeric_err_VALUE);
g_date_clear(&date, 1);
......@@ -82,10 +88,11 @@ static char *help_datevalue = {
"@DESCRIPTION="
"DATEVALUE returns the serial number of the date. @date_str is "
"the string that contains the date. For example, "
"DATEVALUE(\"1/1/1999\") equals to 36160. "
"the string that contains the date. "
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"DATEVALUE(\"1/1/1999\") equals to 36160. "
"\n"
"@SEEALSO=DATE")
};
......@@ -117,8 +124,11 @@ static char *help_datedif = {
"dates, not including the difference in months.\n"
"\"yd\" will return the number of full days between the two "
"dates, not including the difference in years.\n"
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"DATEDIF(DATE(2000,4,30),DATE(2003,8,4),\"d\") equals 1191.\n"
"DATEDIF(DATE(2000,4,30),DATE(2003,8,4),\"y\") equals 3.\n"
"\n"
"@SEEALSO=DATE")
};
......@@ -153,14 +163,16 @@ datedif_opt_yd (GDate *gdate1, GDate *gdate2, int excel_compat)
/* this is clearly wrong, but it's what Excel does. */
/* ( i use 2004 here since it is clearly a leap year.) */
new_year1 = 2004 + (g_date_year (gdate1) & 0x3);
new_year2 = new_year1 + (g_date_year (gdate2) - g_date_year (gdate1));
new_year2 = new_year1 + (g_date_year (gdate2) -
g_date_year (gdate1));
g_date_set_year (gdate1, new_year1);
g_date_set_year (gdate2, new_year2);
{
static gboolean need_warning = TRUE;
if (need_warning) {
g_warning("datedif is known to differ from Excel for some values.");
g_warning("datedif is known to differ from Excel "
"for some values.");
need_warning = FALSE;
}
}
......@@ -190,7 +202,8 @@ datedif_opt_md (GDate *gdate1, GDate *gdate2, int excel_compat)
/* this is clearly wrong, but it's what Excel does. */
/* ( i use 2004 here since it is clearly a leap year.) */
new_year1 = 2004 + (g_date_year (gdate1) & 0x3);
new_year2 = new_year1 + (g_date_year (gdate2) - g_date_year (gdate1));
new_year2 = new_year1 + (g_date_year (gdate2) -
g_date_year (gdate1));
g_date_set_year (gdate1, new_year1);
g_date_set_year (gdate2, new_year2);
......@@ -271,10 +284,12 @@ static char *help_edate = {
"@date is the serial number of the initial date and @months "
"is the number of months before (negative number) or after "
"(positive number) the initial date."
"This function is Excel compatible. "
"\n"
"If @months is not an integer, it is truncated."
"\n"
"@EXAMPLES=\n"
"EDATE(DATE(2001,12,30),2) equals Feb 28, 2002.\n"
"\n"
"@SEEALSO=DATE")
};
......@@ -315,15 +330,17 @@ gnumeric_edate (FunctionEvalInfo *ei, Value **argv)
static char *help_today = {
N_("@FUNCTION=TODAY\n"
"@SYNTAX=TODAY ()\n"
"@SYNTAX=TODAY()\n"
"@DESCRIPTION="
"Returns the serial number for today (the number of days "
"TODAY returns the serial number for today (the number of days "
"elapsed since the 1st of January of 1900)."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"TODAY() returns Nov 6, 2001 on that particular day.\n "
"\n"
"@SEEALSO=TODAY, NOW")
"@SEEALSO=NOW")
};
static Value *
......@@ -339,7 +356,7 @@ static char *help_now = {
"@SYNTAX=NOW ()\n"
"@DESCRIPTION="
"Returns the serial number for the date and time at the time "
"NOW returns the serial number for the date and time at the time "
"it is evaluated.\n"
""
"Serial Numbers in Gnumeric are represented as follows:"
......@@ -349,10 +366,12 @@ static char *help_now = {
""
"For example: .0 represents the beginning of the day, and 0.5 "
"represents noon."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"NOW().\n"
"\n"
"@SEEALSO=TODAY, NOW")
"@SEEALSO=TODAY")
};
static Value *
......@@ -368,9 +387,11 @@ static char *help_time = {
"@SYNTAX=TIME (hours,minutes,seconds)\n"
"@DESCRIPTION="
"Returns a fraction representing the time of day."
"TIME returns a fraction representing the time of day."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"TIME(3, 5, 23) equals 3:05AM.\n"
"\n"
"@SEEALSO=HOUR")
};
......@@ -395,12 +416,15 @@ static char *help_timevalue = {
"@SYNTAX=TIMEVALUE (timetext)\n"
"@DESCRIPTION="
"Returns a fraction representing the time of day, a number "
"TIMEVALUE returns a fraction representing the time of day, a number "
"between 0 and 1."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"TIMEVALUE(\"3:05\") equals 0.128472.\n"
"TIMEVALUE(\"2:24:53 PM\") equals 0.600613.\n"
"\n"
"@SEEALSO=HOUR")
"@SEEALSO=HOUR,MINUTE")
};
static Value *
......@@ -421,14 +445,16 @@ static char *help_hour = {
"@SYNTAX=HOUR (serial_number)\n"
"@DESCRIPTION="
"Converts a serial number to an hour. The hour is returned as "
"HOUR converts a serial number to an hour. The hour is returned as "
"an integer in the range 0 (12:00 A.M.) to 23 (11:00 P.M.)."
"\n"
"Note that Gnumeric will perform regular string to serial "
"number conversion for you, so you can enter a date as a "
"string.\n"
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"HOUR(0.128472) equals 3.\n"
"\n"
"@SEEALSO=MINUTE, NOW, TIME, SECOND")
};
......@@ -448,14 +474,16 @@ static char *help_minute = {
"@SYNTAX=MINUTE (serial_number)\n"
"@DESCRIPTION="
"Converts a serial number to a minute. The minute is returned as "
"an integer in the range 0 to 59."
"MINUTE converts a serial number to a minute. The minute is returned "
"as an integer in the range 0 to 59."
"\n"
"Note that Gnumeric will perform regular string to serial "
"number conversion for you, so you can enter a date as a "
"string."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"MINUTE(0.128472) equals 5.\n"
"\n"
"@SEEALSO=HOUR, NOW, TIME, SECOND")
};
......@@ -476,14 +504,16 @@ static char *help_second = {
"@SYNTAX=SECOND (serial_number)\n"
"@DESCRIPTION="
"Converts a serial number to a second. The second is returned as "
"an integer in the range 0 to 59."
"SECOND converts a serial number to a second. The second is returned "
"as an integer in the range 0 to 59."
"\n"
"Note that Gnumeric will perform regular string to serial "
"number conversion for you, so you can enter a date as a "
"string."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"SECOND(0.600613) equals 53.\n"
"\n"
"@SEEALSO=HOUR, MINUTE, NOW, TIME")
};
......@@ -504,13 +534,15 @@ static char *help_year = {
"@SYNTAX=YEAR (serial_number)\n"
"@DESCRIPTION="
"Converts a serial number to a year."
"YEAR converts a serial number to a year."
"\n"
"Note that Gnumeric will perform regular string to serial "
"number conversion for you, so you can enter a date as a "
"string."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"YEAR(DATE(2003, 4, 30)) equals 2003.\n"
"\n"
"@SEEALSO=DAY, MONTH, TIME, NOW")
};
......@@ -539,13 +571,15 @@ static char *help_month = {
"@SYNTAX=MONTH (serial_number)\n"
"@DESCRIPTION="
"Converts a serial number to a month."
"MONTH converts a serial number to a month."
"\n"
"Note that Gnumeric will perform regular string to serial "
"number conversion for you, so you can enter a date as a "
"string."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"MONTH(DATE(2003, 4, 30)) equals 4.\n"
"\n"
"@SEEALSO=DAY, TIME, NOW, YEAR")
};
......@@ -574,14 +608,15 @@ static char *help_day = {
"@SYNTAX=DAY (serial_number)\n"
"@DESCRIPTION="
"Converts a serial number to a day of month."
"DAY converts a serial number to a day of month."
"\n"
"Note that Gnumeric will perform regular string to serial "
"number conversion for you, so you can enter a date as a "
"string."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"day (\"10/24/1968\") equals 24.\n"
"DAY(\"10/24/1968\") equals 24.\n"
"\n"
"@SEEALSO=MONTH, TIME, NOW, YEAR")
};
......@@ -610,7 +645,7 @@ static char *help_weekday = {
"@SYNTAX=WEEKDAY (serial_number)\n"
"@DESCRIPTION="
"Converts a serial number to a weekday.\n"
"WEEKDAY converts a serial number to a weekday.\n"
"\n"
"This function returns an integer in the range 0-6, where "
"Saturday is 0, Sunday is 1, etc.\n"
......@@ -618,6 +653,7 @@ static char *help_weekday = {
"Note that Gnumeric will perform regular string to serial "
"number conversion for you, so you can enter a date as a "
"string."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"WEEKDAY(\"10/24/1968\") equals 5 (Thursday).\n"
......@@ -649,7 +685,7 @@ static char *help_days360 = {
"@SYNTAX=DAYS360 (date1,date2,method)\n"
"@DESCRIPTION="
"Returns the number of days from @date1 to @date2 following a "
"DAYS360 returns the number of days from @date1 to @date2 following a "
"360-day calendar in which all months are assumed to have 30 days."
"\n"
"If @method is true, the European method will be used. In this "
......@@ -661,8 +697,10 @@ static char *help_days360 = {
"Note that Gnumeric will perform regular string to serial "
"number conversion for you, so you can enter a date as a "
"string."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"DAYS360(DATE(2003, 2, 3), DATE(2007, 4, 2)) equals 1499.\n"
"\n"
"@SEEALSO=MONTH, TIME, NOW, YEAR")
};
......@@ -750,10 +788,11 @@ static char *help_eomonth = {
"@SYNTAX=EOMONTH (start_date,months)\n"
"@DESCRIPTION="
"Returns the last day of the month which is @months "
"EOMONTH returns the last day of the month which is @months "
"from the @start_date."
"\n"
"Returns #NUM! if start_date or months are invalid."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"If A1 contains 12/21/00 then EOMONTH(A1,0)=12/31/00, "
......@@ -799,13 +838,15 @@ static char *help_workday = {
"@SYNTAX=WORKDAY (start_date,days,holidays)\n"
"@DESCRIPTION="
"Returns the day which is @days working days "
"WORKDAY returns the day which is @days working days "
"from the @start_date. Weekends and holidays optionally "
"supplied in @holidays are respected."
"\n"
"Returns #NUM! if @start_date or @days are invalid."
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"WORKDAY(DATE(2001,1,5),DATE(2001,2,15)) equals 88609.\n"
"\n"
"@SEEALSO=NETWORKDAYS")
};
......@@ -868,12 +909,14 @@ static char * help_networkdays = {
"@SYNTAX=NETWORKDAYS (start_date,end_date,holidays)\n"
"@DESCRIPTION="
"Returns the number of non-weekend non-holidays between @start_date "
"and @end_date. Holidays optionally supplied in @holidays."
"NETWORKDAYS returns the number of non-weekend non-holidays between "
"@start_date and @end_date. Holidays optionally supplied in @holidays."
"\n"
"Returns #NUM if start_date or end_date are invalid"
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"NETWORKDAYS(DATE(2001,1,2),DATE(2001,2,15)) equals 33.\n"
"\n"
"@SEEALSO=WORKDAY")
};
......
......@@ -19,28 +19,6 @@
#include <stdio.h>
#include <stdlib.h>
#if 0
/* help template */
static char *help_ = {
N_("@FUNCTION=NAME\n"
"@SYNTAX=(b1, b2, ...)\n"
"@DESCRIPTION"
""
"\n"
""
""
"\n"
""
""
""
""
"@SEEALSO=")
};
#endif
/**
* FIXME: In the long term this needs optimising.
......@@ -288,7 +266,7 @@ static char *help_oct2bin = {
"@SYNTAX=OCT2BIN(number[,places])\n"
"@DESCRIPTION="
"The OCT2BIN function converts an octal number to a binary "
"OCT2BIN function converts an octal number to a binary "
"number. @places is an optional field, specifying to zero pad "
"to that number of spaces. "
"This function is Excel compatible. "
......@@ -314,7 +292,7 @@ static char *help_oct2hex = {
"@SYNTAX=OCT2HEX(number[,places])\n"
"@DESCRIPTION="
"The OCT2HEX function converts an octal number to a hexadecimal "
"OCT2HEX function converts an octal number to a hexadecimal "
"number. @places is an optional field, specifying to zero pad "
"to that number of spaces. "
"This function is Excel compatible. "
......@@ -340,7 +318,7 @@ static char *help_hex2bin = {
"@SYNTAX=HEX2BIN(number[,places])\n"
"@DESCRIPTION="
"The HEX2BIN function converts a hexadecimal number to a binary "
"HEX2BIN function converts a hexadecimal number to a binary "
"number. @places is an optional field, specifying to zero pad "
"to that number of spaces."
"\n"
......@@ -366,7 +344,7 @@ static char *help_hex2oct = {
"@SYNTAX=HEX2OCT(number[,places])\n"
"@DESCRIPTION="
"The HEX2OCT function converts a hexadecimal number to an octal "
"HEX2OCT function converts a hexadecimal number to an octal "
"number. @places is an optional field, specifying to zero pad "
"to that number of spaces."
"\n"
......@@ -392,7 +370,7 @@ static char *help_hex2dec = {
"@SYNTAX=HEX2DEC(x)\n"
"@DESCRIPTION="
"The HEX2DEC function converts a hexadecimal number "
"HEX2DEC function converts a hexadecimal number "
"to its decimal equivalent. "
"This function is Excel compatible. "
"\n"
......@@ -1677,7 +1655,7 @@ static char *help_erfc = {
"@SYNTAX=ERFC(x)\n"
"@DESCRIPTION="
"The ERFC function returns the complementary "
"ERFC function returns the complementary "
"error function, defined as 1 - erf(x). "
"erfc(x) is calculated more accurately than 1 - erf(x) for "
"arguments larger than about 0.5."
......@@ -1707,7 +1685,7 @@ static char *help_delta = {
"@SYNTAX=DELTA(x[,y])\n"
"@DESCRIPTION="
"The DELTA function tests for numerical equivalence of two "
"DELTA function tests for numerical equivalence of two "
"arguments returning 1 in case of equality. "
"@y is optional, and defaults to 0."
"\n"
......
......@@ -1472,7 +1472,7 @@ static char *help_sln = {
N_("@FUNCTION=SLN\n"
"@SYNTAX=SLN(cost,salvage_value,life)\n"
"@DESCRIPTION="
"The SLN function will determine the straight line depreciation "
"SLN function will determine the straight line depreciation "
"of an asset for a single period. The amount you paid for the "
"asset is the @cost, @salvage is the value of the asset at the "
"end of its useful life, and @life is the number of periods over "
......@@ -2876,6 +2876,7 @@ static char *help_yielddisc = {
N_("@FUNCTION=YIELDDISC\n"
"@SYNTAX=YIELDDISC(settlement,maturity,pr,redemption[,basis])\n"
"@DESCRIPTION="
"YIELDDISC FIXME. "
"@frequency is the number of coupon payments per year. "
"Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. "
"@basis is the type of day counting system you want to use:\n"
......@@ -2908,6 +2909,7 @@ static char *help_yieldmat = {
N_("@FUNCTION=YIELDMAT\n"
"@SYNTAX=YIELDMAT(settlement,maturity,issue,rate,pr[,basis])\n"
"@DESCRIPTION="
"YIELDMAT FIXME. "
"@frequency is the number of coupon payments per year. "
"Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. "
"@basis is the type of day counting system you want to use:\n"
......@@ -3026,6 +3028,7 @@ static char *help_oddfyield = {
"@SYNTAX=ODDFYIELD(settlement,maturity,issue,first_coupon,rate,"
"pr,redemption,frequency[,basis])\n"
"@DESCRIPTION="
"ODDFYIELD FIXME. "
"@frequency is the number of coupon payments per year. "
"Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. "
"@basis is the type of day counting system you want to use:\n"
......@@ -3059,6 +3062,7 @@ static char *help_oddlprice = {
"@SYNTAX=ODDLPRICE(settlement,maturity,last_interest,rate,yld,"
"redemption,frequency[,basis])\n"
"@DESCRIPTION="
"ODDLPRICE FIXME."
"\n"
"@EXAMPLES=\n"
"\n"
......@@ -3078,6 +3082,7 @@ static char *help_oddlyield = {
"@SYNTAX=ODDLYIELD(settlement,maturity,last_interest,rate,pr,"
"redemption,frequency[,basis])\n"
"@DESCRIPTION="
"ODDLYIELD FIXME."
"@frequency is the number of coupon payments per year. "
"Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. "
"@basis is the type of day counting system you want to use:\n"
......
......@@ -79,13 +79,26 @@ get_value_class (FunctionEvalInfo *ei, ExprTree *expr)
static char *help_cell = {
N_("@FUNCTION=CELL\n"
"@SYNTAX=CELL(ref)\n"
"@SYNTAX=CELL(type,ref)\n"
"@DESCRIPTION="
"CELL returns information about the formatting, location, or "
"contents of a cell. "
"\n"
"@type specifies the type of information you want to obtain:\n "
" address Returns the given cell reference as text.\n"
" col Returns the number of the column in @ref.\n"
" contents Returns the contents of the cell in @ref.\n"
" format Returns the code of the format of the cell.\n"
" parentheses Returns 1 if @ref contains a negative value\n"
" and it's format displays it with parentheses.\n"
" row Returns the number of the row in @ref.\n"
" width Returns the column width.\n"
"\n"
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"CEll(\"format\",A1) returns the code of the format of the cell A1.\n"
"\n"
"@SEEALSO=")
};
......@@ -178,10 +191,13 @@ gnumeric_cell (FunctionEvalInfo *ei, Value **argv)
} else if (!g_strcasecmp (info_type, "col")) {
return value_new_int (ref.col + 1);
} else if (!g_strcasecmp (info_type, "color")) {
FormatCharacteristics info = retrieve_format_info (ei->pos->sheet, ref.col, ref.row);
FormatCharacteristics info = retrieve_format_info (ei->pos->sheet,
ref.col,
ref.row);
/* 0x01 = first bit (1) indicating negative colors */
return (info.negative_fmt & 0x01) ? value_new_int (1) : value_new_int (0);
return (info.negative_fmt & 0x01) ? value_new_int (1) :
value_new_int (0);
} else if (!g_strcasecmp (info_type, "contents")) {
Cell *cell = sheet_cell_get (ei->pos->sheet, ref.col, ref.row);
......@@ -196,16 +212,21 @@ gnumeric_cell (FunctionEvalInfo *ei, Value **argv)
else
return value_new_string (name);
} else if (!g_strcasecmp (info_type, "format")) {
MStyle *mstyle = sheet_style_get (ei->pos->sheet, ref.col, ref.row);
MStyle *mstyle = sheet_style_get (ei->pos->sheet, ref.col,
ref.row);
return translate_cell_format (mstyle_get_format (mstyle));
} else if (!g_strcasecmp (info_type, "parentheses")) {
FormatCharacteristics info = retrieve_format_info (ei->pos->sheet, ref.col, ref.row);
FormatCharacteristics info = retrieve_format_info (ei->pos->sheet,
ref.col,
ref.row);
/* 0x02 = second bit (2) indicating parentheses */
return (info.negative_fmt & 0x02) ? value_new_int (1) : value_new_int (0);
return (info.negative_fmt & 0x02) ? value_new_int (1) :
value_new_int (0);
} else if (!g_strcasecmp (info_type, "prefix")) {
MStyle *mstyle = sheet_style_get (ei->pos->sheet, ref.col, ref.row);
MStyle *mstyle = sheet_style_get (ei->pos->sheet, ref.col,
ref.row);
Cell *cell = sheet_cell_get (ei->pos->sheet, ref.col, ref.row);
if (cell && cell->value && cell->value->type == VALUE_STRING) {
......@@ -220,7 +241,8 @@ gnumeric_cell (FunctionEvalInfo *ei, Value **argv)
}
return value_new_string ("");
} else if (!g_strcasecmp (info_type, "protect")) {
MStyle const *mstyle = sheet_style_get (ei->pos->sheet, ref.col, ref.row);
MStyle const *mstyle = sheet_style_get (ei->pos->sheet, ref.col,
ref.row);
return value_new_int (mstyle_get_content_locked (mstyle) ? 1 : 0);
} else if (!g_strcasecmp (info_type, "row")) {
return value_new_int (ref.row + 1);
......@@ -305,6 +327,7 @@ static char *help_countblank = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"COUNTBLANK(A1:A20) returns the number of blank cell in A1:A20.\n"
"\n"
"@SEEALSO=COUNT")
};
......@@ -336,13 +359,26 @@ gnumeric_countblank (FunctionEvalInfo *ei, Value **args)
static char *help_info = {
N_("@FUNCTION=INFO\n"
"@SYNTAX=INFO()\n"
"@SYNTAX=INFO(type)\n"
"@DESCRIPTION="
"INFO returns information about the current operating environment. "
"This function is Excel compatible. "
"\n"
"@type is the type of information you want to obtain:\n"
" memavail Returns the amount of memory available (bytes).\n"
" memused Returns the amount of memory used (bytes).\n"
" numfile Returns the number of active worksheets.\n"
" osversion Returns the operating system version.\n"
" recalc Returns the recalculation mode (automatic).\n"
" release Returns the version of Gnumeric as text.\n"
" system Returns the name of the environment.\n"
" totmem Returns the amount of total memory available.\n"
"\n"
"This function is Excel compatible, except that types directory "
"and origin are not implemented. "
"\n"
"@EXAMPLES=\n"
"INFO(\"system\") returns \"Linux\" on a Linux system.\n"
"\n"
"@SEEALSO=")
};
......@@ -421,6 +457,7 @@ static char *help_iserror = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISERROR(NA()) equals TRUE.\n"
"\n"
"@SEEALSO=ERROR")
};
......@@ -475,8 +512,9 @@ static char *help_isna = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISNA(NA()) equals TRUE.\n"
"\n"
"@SEEALSO=")
"@SEEALSO=NA")
};
/*
......@@ -509,8 +547,9 @@ static char *help_iserr = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISERR(NA()) return FALSE.\n"
"\n"
"@SEEALSO=")
"@SEEALSO=ISERROR")
};
static Value *
......@@ -598,8 +637,8 @@ static char *help_na = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"\n"
"@SEEALSO=")
"NA() equals #N/A error.\n"
"@SEEALSO=ISNA")
};
static Value *
......@@ -615,9 +654,10 @@ static char *help_error = {
"@SYNTAX=ERROR(text)\n"
"@DESCRIPTION="
"ERROR return the specified error\n"
"ERROR return the specified error.\n"
"\n"
"@EXAMPLES=\n"
"ERROR(\"#OWN ERROR\").\n"
"\n"
"@SEEALSO=ISERROR")
};
......@@ -639,6 +679,7 @@ static char *help_isblank = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISBLANK(A1).\n"
"\n"
"@SEEALSO=")
};
......@@ -687,6 +728,7 @@ static char *help_iseven = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISEVEN(4) equals TRUE.\n"
"\n"
"@SEEALSO=ISODD")
};
......@@ -708,6 +750,7 @@ static char *help_islogical = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISLOGICAL(A1).\n"
"\n"
"@SEEALSO=")
};
......@@ -737,6 +780,7 @@ static char *help_isnontext = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISNONTEXT(\"text\") equals FALSE.\n"
"\n"
"@SEEALSO=ISTEXT")
};
......@@ -763,6 +807,7 @@ static char *help_isnumber = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISNUMBER(\"text\") equals FALSE.\n"
"\n"
"@SEEALSO=")
};
......@@ -789,6 +834,7 @@ static char *help_isodd = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISODD(3) equals TRUE.\n"
"\n"
"@SEEALSO=ISEVEN")
};
......@@ -810,6 +856,7 @@ static char *help_isref = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISREF(A1) equals TRUE.\n"
"\n"
"@SEEALSO=")
};
......@@ -841,6 +888,7 @@ static char *help_istext = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"ISTEXT(\"text\") equals TRUE.\n"
"\n"
"@SEEALSO=ISNONTEXT")
};
......@@ -868,6 +916,7 @@ static char *help_n = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"N(\"42\") equals 42.\n"
"\n"
"@SEEALSO=")
};
......@@ -905,6 +954,8 @@ static char *help_type = {
"This function is Excel compatible. "
"\n"
"@EXAMPLES=\n"
"TYPE(3) equals 1.\n"
"TYPE(\"text\") equals 2.\n"
"\n"
"@SEEALSO=")
};
......
......@@ -337,6 +337,9 @@ static char *help_address = {
"error. "
"\n"
"@EXAMPLES=\n"
"ADDRESS(5,4) equals \"$D$5\".\n"
"ADDRESS(5,4,4) equals \"D5\".\n"
"ADDRESS(5,4,3,FALSE) equals \"R[5]C4\".\n"
"\n"
"@SEEALSO=")
};
......@@ -430,6 +433,7 @@ static char *help_choose = {
"If @index < 1 or @index > number of values: returns #VAL!."
"\n"
"@EXAMPLES=\n"
"CHOOSE(3,\"Apple\",\"Orange\",\"Grape\",\"Perry\") equals \"Grape\".\n"
"\n"
"@SEEALSO=IF")
};
......@@ -597,7 +601,7 @@ static char *help_lookup = {
"@