HOME

TheInfoList



OR:

C alternative tokens refer to a set of alternative spellings of common operators in the
C programming language ''The C Programming Language'' (sometimes termed ''K&R'', after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language, as well as ...
. They are implemented as a group of macro constants in the C standard library in the iso646.h header. The tokens were created by Bjarne Stroustrup for the pre-standard C++ language and were added to the C standard in a 1995 amendment to the C90 standard via library to avoid the breakage of existing code. The alternative tokens allow programmers to use
C language C (''pronounced like the letter c'') is a general-purpose computer programming language. It was created in the 1970s by Dennis Ritchie, and remains very widely used and influential. By design, C's features cleanly reflect the capabilities o ...
bitwise and logical
operators Operator may refer to: Mathematics * A symbol indicating a mathematical operation * Logical operator or logical connective in mathematical logic * Operator (mathematics), mapping that acts on elements of a space to produce elements of another sp ...
which could otherwise be hard to type on some international and non-
QWERTY QWERTY () is a keyboard layout for Latin-script alphabets. The name comes from the order of the first six keys on the top left letter row of the keyboard ( ). The QWERTY design is based on a layout created for the Sholes and Glidden ty ...
keyboards. The name of the header file they are implemented in refers to the
ISO/IEC 646 ISO/IEC 646 is a set of ISO/ IEC standards, described as ''Information technology — ISO 7-bit coded character set for information interchange'' and developed in cooperation with ASCII at least since 1964. Since its first edition in ...
standard, a 7-bit character set with a number of regional variations, some of which have accented characters in place of the punctuation marks used by C operators.


The macros

The iso646.h header defines the following 11 macros as stated below:


C++

The above-mentioned identifiers are operator keywords in the ISO C++ programming language and do not require the inclusion of a header file. For consistency, the
C++98 C98 or C-98 may refer to: * C-98 Clipper, the military designation of the Boeing 314 flying boat * CJYC-FM, "Big John FM", formerly known as "C98" * Cray C98, a model of the Cray C90 * Ruy Lopez The Ruy Lopez (; ), also called the Spanish ...
standard provides the header <ciso646>. However the latter file has no effect, being empty. Some compilers, such as
Microsoft Visual C++ Microsoft Visual C++ (MSVC) is a compiler for the C, C++ and C++/CX programming languages by Microsoft. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available in both tr ...
have, at least in the past, required the header to be included in order to use these identifiers unless a compiler flag is set.


See also

* Digraphs and trigraphs in C


References


External links

* {{man, bd, iso646.h, SUS, alternative spellings C (programming language)