Would you like signs with those chars?
Would you like signs with those chars?
Posted Oct 25, 2022 16:10 UTC (Tue) by khim (subscriber, #9252)In reply to: Would you like signs with those chars? by dvdeug
Parent article: Would you like signs with those chars?
> It's not looking for ASCII letters; it's looking for 'i', 'n', 't', or the identifier in Unicode.
Only identifier is not “Unicode”. It's alpha
or Unicode then alnum
or Unicode (where Unicode is defined as “anything with a high bit set”).
Doxygen does that with lex, but in simpler cases you may do the same with ctype.h
.
Posted Oct 25, 2022 23:41 UTC (Tue)
by dvdeug (guest, #10998)
[Link] (1 responses)
Posted Oct 26, 2022 0:36 UTC (Wed)
by khim (subscriber, #9252)
[Link]
Sure, but standard doesn't say what compiler (or, even worse non-compiler) have to do with broken programs. And if you ignore what standard says and just go with It's not as if we live in a world where everyone cares all that much about following the standard to a
Would you like signs with those chars?
Would you like signs with those chars?
isalpha/isalnum
+ Unicode (where Unicode == “high bit is set”) then you would handle all correct programs perfectly. And if someone feeds incorrect one… who cares how would it be handled?T
.