LF=Line Feed, which *bsd, Linux and Unix use as a line ending string (DOS and 
OS/2 use CRLF).

The code you show is really an expression, using $() to swallow a new line. 
It's a cute shellism, but it's not really a string literal.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of 
Paul Gilmartin [[email protected]]
Sent: Friday, June 25, 2021 11:23 AM
To: [email protected]
Subject: Re: Coding for the future

On Fri, 25 Jun 2021 14:14:41 +0000, Seymour J Metz wrote:

>Here documents create strings containing embedded new lines, which *ix systems 
>encode as LF. They do not allow strings not containing embedded new lines to 
>be split across multiple lines of the source code.
>
"LF"?  FSVO *ix.  How about:

cat <<EOF
foo$( :
)bar
EOF
574 $
574 $ cat <<EOF
> foo$( :
> )bar
> EOF
foobar

I've suggested that technique for coding long lines and comments in
FB80 STDIN for B PXBATCH.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to