In C, char constants are syntactically the same as int constants.
You have two choices to write hex int or char constants:
the "int" flavor: 0xf0
the "char" flavor: '\xf0'
or simply 240
or (this is ill-fated IMO) 0360 ...
because a leading zero makes the number an octal number in C
So, yes, if you choice to use the char representation, you have to code
apostrophes, not quotes.
(IMO, apostrophe = ', quote = ")
HTH, kind regards
Bernd
Am 17.08.2022 um 11:05 schrieb Binyamin Dissen:
Quite possible.
To confirm, it is '\xf0' with surrounding quotes of \xF0 without quotes. Or
both?
On Wed, 17 Aug 2022 09:31:18 +0200 Bernd Oppolzer <[email protected]>
wrote:
:>Could it be that the source has been transferred in any way?
:>
:>It would be valid, if there was a backslash before the hex constant,
:>like below;
:>backslash, followed by x, followed by two hex digits is a single char in C.
:>
:>str2 = str2 ¦ '\xF0';
:>
:>HTH, kind regards
:>
:>Bernd
:>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN