aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawktexi.in
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r--doc/gawktexi.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index bbf7f5d6..d5707932 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -3872,6 +3872,24 @@ This is particularly useful
when you have library functions that you want to use from your command-line
programs (@pxref{AWKPATH Variable}).
+Note that @command{gawk} treats each string as if it ended with
+a newline character (even if it doesn't). This makes building
+the total program easier.
+
+@quotation CAUTION
+At the moment, there is no requirement that each @var{program-text}
+be a full syntactic unit. I.e., the following currently works:
+
+@example
+$ @kbd{gawk -e 'BEGIN @{ a = 5 ;' -e 'print a @}'}
+@print{} 5
+@end example
+
+@noindent
+However, this could change in the future, so it's not a
+good idea to rely upon this feature.
+@end quotation
+
@item @option{-E} @var{file}
@itemx @option{--exec} @var{file}
@cindex @option{-E} option