diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi index 0a775dd82b60e4c7c3753add9b76ba5b0e40f27e..40b5f462653127667eb2be70cddd25bc172a24aa 100644 --- a/doc/texinfo/gmsh.texi +++ b/doc/texinfo/gmsh.texi @@ -997,8 +997,9 @@ parsing of the script file: TextAttributes(@var{char-expression}<,@var{char-expression}@dots{}>) | Exists(@var{string}) | Exists(@var{string}~@{ @var{expression} @}) | FileExists(@var{char-expression}) | - DefineNumber(@var{expression}, @var{onelab-options}) + GetNumber(@var{char-expression}) | GetValue("@var{string}", @var{expression}) | + DefineNumber(@var{expression}, @var{onelab-options}) | @end example Such @w{@var{expression}s} are used in most of Gmsh's scripting @@ -1036,7 +1037,14 @@ the first string is greater than, equal to, or less than the second string). @code{TextAttributes} creates attributes for text strings. @code{Exists} checks if a variable with the given name exists (i.e., has been defined previously), and @code{FileExists} checks if the -file with the given name exists. +file with the given name exists. @code{GetNumber} allows to get the +value of a ONELAB variable (the argument is the name of the +variable). @code{GetValue} allows to ask the user for a value +interactively. For example, inserting @code{GetValue("Value of parameter +alpha?", 5.76)} in an input file will query the user for the value of a +certain parameter alpha, assuming the default value is 5.76. If the +option @code{General.NoPopup} is set (@pxref{General options list}), no +question is asked and the default value is automatically used. @code{DefineNumber} allows to define a ONELAB variable in-line. The @var{expression} given as the first argument is the default value; this @@ -1044,13 +1052,6 @@ is followed by the various ONELAB options. See @uref{http://onelab.info/wiki/ONELAB_Syntax_for_Gmsh_and_GetDP} for more information. -The last case in the definition allows to ask the user for a value -interactively. For example, inserting @code{GetValue("Value of parameter -alpha?", 5.76)} in an input file will query the user for the value of a -certain parameter alpha, assuming the default value is 5.76. If the -option @code{General.NoPopup} is set (@pxref{General options list}), no -question is asked and the default value is automatically used. - @cindex Expressions, lists List of expressions are also widely used, and are defined as: @@ -1122,7 +1123,7 @@ Character expressions are defined as: @example @var{char-expression}: "@var{string}" | - Today | OnelabAction | + Today | OnelabAction | GmshExecutableName | StrPrefix ( @var{char-expression} ) | StrRelative ( @var{char-expression} ) | StrCat ( @var{char-expression} <,@dots{}> ) | @@ -1132,6 +1133,7 @@ Character expressions are defined as: Sprintf ( @var{char-expression} ) | Sprintf ( @var{char-option} ) | GetEnv ( @var{char-expression} ) | + GetString ( @var{char-expression} ) | GetString ( @var{char-expression} , @var{char-expression} ) | StrReplace ( @var{char-expression} , @var{char-expression} , @var{char-expression} ) DefineString(@var{char-expression}, @var{onelab-options}) @@ -1146,9 +1148,11 @@ function (where @var{char-expression} is a format string that can contain floating point formatting characters: @code{%e}, @code{%g}, etc.) The various @w{@var{char-option}s} are listed in @ref{Options}. @code{GetEnvThe} gets the value of an environment -variable from the operating system. @code{GetString} allows to ask the -user for a value interactively. @code{StrReplace}'s arguments are: input -string, old substring, new substring.@footnote{For compatibility with GetDP +variable from the operating system. @code{GetString} allows to get a +ONELAB string value (with one argument, the name of the ONELAB +variable), or ask the user for a value interactively (with two +arguments). @code{StrReplace}'s arguments are: input string, old +substring, new substring.@footnote{For compatibility with GetDP (@uref{http://geuz.org/getdp/}), parentheses can be replaced by brackets @code{[]} in @code{Str} and @code{Sprintf}.} @@ -1657,6 +1661,12 @@ with the ONELAB database if it has not been defined before. See @uref{http://onelab.info/wiki/ONELAB_Syntax_for_Gmsh_and_GetDP} for more information. +@item SetNumber( @var{char-expression} , @var{expression} ); +Sets the value a numeric ONELAB variable @var{char-expression}. + +@item SetString( @var{char-expression} , @var{char-expression} ); +Sets the value a string ONELAB variable @var{char-expression}. + @item @var{real-option} = @var{expression}; Affects @var{expression} to a real option.