> -----Original Message-----
> From: IBM Mainframe Discussion List <[email protected]> On
> Behalf Of Charles Mills
> Sent: Friday, March 01, 2019 8:30 AM
> To: [email protected]
> Subject: Re: How do I get a lower-case value into a "long" symbol?
> 
> Assembler, allegedly the model for JCL, gets both of those right.
> 
> (From memory)
> 
> &FOO SETC 'Don''t'
> X    DC   C'&FOO'
> 
> Gives you a constant of "Don't" (and no syntax error).
> 
> C on the other hand does not substitute for symbols -- C calls them macros -- 
> inside a
> character constant.
> 
> #define FOO Don't
> char x[] = "FOO"; gives you a constant of "FOO". You have to jump through 
> some real
> hoops to get a symbol into a character literal.

It doesn't seem like much of a hoop.

#define FOO "Don't"
char x[] = FOO; creates an array of 6 char containing 'D', 'o', 'n', '''', 't', 
and '\0'.  What doesn't work for you?

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

Reply via email to