Operating System - HP-UX
1833780 Members
2351 Online
110063 Solutions
New Discussion

ISO C Standard Charecter Set

 

ISO C Standard Charecter Set

Hi folks,

Is '@' a supported character in 'ISO C Standard Character Set'

Please explain me as early as fast...
3 REPLIES 3
Fred Ruffet
Honored Contributor

Re: ISO C Standard Charecter Set

I would say Yes. Can you imagine such a used character set that couldn't handle email addresses ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)

Re: ISO C Standard Charecter Set

Hi,

Thanks for replay.

which are the valid places for using '@' character. I mean variable names, constants, character variable values and the like

Re: ISO C Standard Charecter Set

You can't use the '@' character in identifiers. If you try the HP compiler complains -

Error 92: "foo.c", line 4 # Character '@' (value 64) was unexpected.
int de@bug = 7;

K&R (Kernighan & Ritchie _ The C programming Language) says 'An identifier is a sequence of letters and digits. the first character must be a letter; the underscore _ counts as a letter. Upper and lower case letters are different. ...'

Which suggests to me only [A-Z][a-z][0-9] & '_' are allowed.

Of course you can use the '@' in String Literals.
Hello World