This is just for my information .So if u can help it wud be fine.
I m trying to find out if ther is an escape character in Cobol so that
I can print the line with quotation marks
For Example: I want to display the following line
"My Name is Harshad" with the quotes
I hve tried using the following
DISPLAY ""My name is Harshad"".
but this has returned me obvious errors.
Thanx in advance ...
Bye
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDem
Please don't write in IM-Speak.
"you".
"would".
Thank you.
>
>I m trying to find out if ther is an escape character in Cobol so that
>I can print the line with quotation marks
>For Example: I want to display the following line
>
>"My Name is Harshad" with the quotes
>
>I hve tried using the following
>
>DISPLAY ""My name is Harshad"".
>
>but this has returned me obvious errors.
This is *very* clearly documented in *any* Cobol manual.
"Quotation marks in balanced pairs enclose nonnumeric literals. ... Within a
simple nonnumeric literal, two consecutive quotation marks represent one
quotation mark." [Tandem Cobol85 Manual, Ch. 3 "Language Elements", "Quotation
Marks" section]
Thus, you need "" for each of the quotation marks you want to appear inside
the literal, and also " at each end of the literal -- like so:
"""R T F M"""
--
Regards,
Doug Miller (alphageek at milmac dot com)
It's time to throw all their damned tea in the harbor again.
> display quote My name is Harshad quote
Sorry. Meant
display quote "My name is Harshad" quote
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access