Iso646.h
   HOME

TheInfoList



OR:

C alternative tokens refer to a set of alternative spellings of common operators in the
C programming language C (''pronounced'' '' – like the letter c'') is a general-purpose 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 of ...
. They are implemented as a group of macro constants in the
C standard library The C standard library, sometimes referred to as libc, is the standard library for the C (programming language), C programming language, as specified in the ISO C standard.International Organization for Standardization, ISO/International Electrote ...
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 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 ...
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 Computer keyboard keys#Types, keys on the top letter row of the keyboard: . The QWERTY design is based on a layout included in the Sh ...
keyboards. The name of the header file they are implemented in refers to the
ISO/IEC 646 ISO/IEC 646 ''Information technology — ISO 7-bit coded character set for information interchange'', is an International Organization for Standardization, ISO/International Electrotechnical Commission, IEC standard in the ...
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 The International Organization for Standardization (ISO ; ; ) is an independent, non-governmental, international standard development organization composed of representatives from the national standards organizations of member countries. Me ...
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 (ECO code), a chess opening * Lake Village Airpor ...
standard provided both <iso646.h> and a corresponding <ciso646>. However they both had no effect, being empty. Some compilers, such as
Microsoft Visual C++ Microsoft Visual C++ (MSVC) is a compiler for the C, C++, C++/CLI 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 i ...
have, at least in the past, required the header to be included in order to use these identifiers unless a compiler flag is set. The header <ciso646> was deprecated in
C++17 C17, C-17 or C.17 may refer to: Transportation * , a 1917 British C-class submarine Air * Boeing C-17 Globemaster III, a military transport aircraft * Lockheed Y1C-17 Vega, a six-passenger monoplane * Cierva C.17, a 1928 English experimental ...
, and removed in
C++20 C20 or C-20 may refer to: Science and technology * Carbon-20 (C-20 or 20C), an isotope of carbon * C20, the smallest possible fullerene (a carbon molecule) * C20 (engineering), a mix of concrete that has a compressive strength of 20 newtons per squ ...
, while <iso646.h> was retained for compatibility with C.


See also

* Digraphs and trigraphs in C


References


External links

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