pinard@EDDIE.MIT.EDU (Francois Pinard) (01/14/90)
The documentation says:
If you would like to split a single statement into two lines at a
point where a newline would terminate it, you can "continue" it by
ending the first line with a backslash character, `\'. This is
allowed absolutely anywhere in the statement, even in the middle of a
string or regular expression. For example:
But it does not seem to work, at least for strings. The following input:
------------------------------------------------------------>
BEGIN {
print "A single line \
continued"
}
------------------------------------------------------------<
yields:
------------------------------------------------------------>
gawk -v -f test.awk
Gnu Awk (gawk) 2.10beta 07 Apr 1989
gawk: syntax error near line 2:
^ parse error
------------------------------------------------------------<
--
Franc,ois Pinard pinard@iro.umontreal.ca
(514) 588-4656 ``Vivement GNU!'' ...!uunet!iros1!pinard
arnold@audiofax.com (Arnold Robbins) (01/16/90)
In article <9001132004.AA07727@kovic.IRO.UMontreal.CA> mcgill-vision!iros1!pinard@EDDIE.MIT.EDU (Francois Pinard) writes: >But it does not seem to work, at least for strings. The following input: >------------------------------------------------------------> >BEGIN { > print "A single line \ >continued" >} Unfortunately, this is still broken, even in 2.11.1. Hopefully we'll be able to fix for either the next patch or the next release (whichever comes first). >Gnu Awk (gawk) 2.10beta 07 Apr 1989 In the meantime, this is an OLD version of gawk. Get 2.11.1 from prep.ai.mit.edu or osu-cis; you want it, you really do. -- Arnold Robbins -- Senior Research Scientist - AudioFAX | Laundry increases 2000 Powers Ferry Road, #220 / Marietta, GA. 30067 | exponentially in the INTERNET: arnold@audiofax.com Phone: +1 404 933 7600 | number of children. UUCP: emory!audfax!arnold Fax: +1 404 933 7606 | -- Miriam Hartholz