From 442540d32d7fd7f0880db8640d285b3e90c20e3d Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 5 Jun 2020 13:30:24 +0300 Subject: Allow typed regex in return statement. Update the doc. --- doc/gawk.texi | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'doc/gawk.texi') diff --git a/doc/gawk.texi b/doc/gawk.texi index 1a886b9a..61413473 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -11720,6 +11720,9 @@ and As a parameter in a call to a user-defined function (@pxref{User-defined}). +@item +As the return value of a user-defined function. + @item On the righthand side of an assignment to a variable: @samp{some_var = @@/foo/}. In this case, the type of @code{some_var} is regexp. Additionally, @code{some_var} @@ -15102,13 +15105,14 @@ the execution of statements based on a @code{case} match. Case statements are checked for a match in the order they are defined. If no suitable @code{case} is found, the @code{default} section is executed, if supplied. -Each @code{case} contains a single constant, be it numeric, string, or -regexp. The @code{switch} expression is evaluated, and then each -@code{case}'s constant is compared against the result in turn. The type of constant -determines the comparison: numeric or string do the usual comparisons. -A regexp constant does a regular expression match against the string -value of the original expression. The general form of the @code{switch} -statement looks like this: +Each @code{case} contains a single constant, be it numeric, string, +or regexp. The @code{switch} expression is evaluated, and then each +@code{case}'s constant is compared against the result in turn. The +type of constant determines the comparison: numeric or string do the +usual comparisons. A regexp constant (either regular, @code{/foo/}, or +strongly typed, @code{@@/foo/}) does a regular expression match against +the string value of the original expression. The general form of the +@code{switch} statement looks like this: @example switch (@var{expression}) @{ -- cgit v1.2.3