RE: Question about---error: stray ‘@’ in program

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

> I've searched on the net, but I can't find an explanation of what is going on with the above. If you know, please tell me.

On the third line, there are these characters:
A1@B,

The @ character is not a legitimate character for use in an identifier in C.

The legitimate characters are:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
_ 0 1 2 3 4 5 6 7 8 9

(Numbers cannot be used for the initial character.)

With GCC's -fdollars-in-identifiers flag, you can also use:
$

But such use is probably discouraged.

There may be extensions to C which would allow Unicode characters for use in identifiers.  If so, it's not an extension I've used.

HTH,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux