aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.texi
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-11-24 20:25:48 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-11-24 20:25:48 +0200
commitd5724bb61af6f7c3d3b491612cbd0bcc05f5d056 (patch)
tree86d6678a12c6a6d37a5c5f46417d4da461c704d4 /doc/gawk.texi
parent5f60e83a43df739f1dd02c4f7601148f3c9006ab (diff)
parentac2ff45364ab20c1a2bc82f779738f33f90808dd (diff)
downloadegawk-d5724bb61af6f7c3d3b491612cbd0bcc05f5d056.tar.gz
egawk-d5724bb61af6f7c3d3b491612cbd0bcc05f5d056.tar.bz2
egawk-d5724bb61af6f7c3d3b491612cbd0bcc05f5d056.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r--doc/gawk.texi16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 68a03042..22358d1e 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -11566,6 +11566,22 @@ sequences
(@pxref{Escape Sequences}).
@value{DARKCORNER}
+Normally, variables assigned on the command line (with or without the
+@option{-v} option) are treated as strings. When such variables are
+used as numbers, @command{awk}'s normal automatic conversion of strings
+to numbers takes place, and everything ``just works.''
+
+However, @command{gawk} supports variables whose types are ``regexp''.
+You can assign variables of this type using the following syntax:
+
+@example
+gawk -v 're1=@/foo|bar/' '@dots{}' /path/to/file1 're2=@/baz|quux/' /path/to/file2
+@end example
+
+@noindent
+Strongly typed regexps are an advanced feature (@pxref{Strong Regexp Constants}).
+We mention them here only for completeness.
+
@node Conversion
@subsection Conversion of Strings and Numbers