NET/MASTER Network Control Language (NCL) Reference Manual
QUOTE
Built-in Functions
4–68 106126 Tandem Computers Incorporated
In the previous example, the result is “ITS A QUOTE,”. The string “IT” is
concatenated with the string “S A QUOTE,” and the attempt to specify a single quote
character as
quotechar
also fails. NCL uses the double quote character because none
is specified.
Two further attempts to solve the problem are given in the following example:
QUOTE_IT: PROCEDURE
&A=“IT’S A QUOTE”
&B=“‘“
SAY QUOTE(&A,”‘”)
SAY QUOTE(&A,&B)
END QUOTE_IT
The two results in the previous example are ‘IT‘‘S A QUOTE‘. The two single quote
characters that precede the “S” are there because if any quote character appears in a
string, it is repeated. (See the first consideration earlier). Try changing the
specification of the quote character. The following example provides two possible
solutions:
QUOTE_IT: PROCEDURE
&A=“IT’S A QUOTE”
&B=‘“‘
SAY QUOTE(&A,’”’)
SAY QUOTE(&A,&B)
END QUOTE_IT
The final result, “IT’S A QUOTE”, is correct.