Iso646.h
Welcome to MedLibrary.org. For best results, we recommend beginning with the navigation links at the top of the page, which can guide you through our collection of over 14,000 medication labels and package inserts. For additional information on other topics which are not covered by our database of medications, just enter your topic in the search box below:
| C Standard Library |
|---|
|
C alternative tokens refer to a set of alternative spellings of common operators in the C programming language. They are implemented as a group of macro constants in the C standard library in the iso646.h header. The tokens were added to the standard in a 1995 amendment to the C90 standard.
The alternative tokens allow programmers to use C language bitwise and logical operators which could otherwise be hard to type on some international and non-QWERTY keyboards. The name of the header file they are implemented in refers to the ISO646 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.
Contents |
The macros
The iso646.h header defines the following 11 macros as stated below:
| Macro | Defined as |
|---|---|
| and | && |
| and_eq | &= |
| bitand | & |
| bitor | | |
| compl | ~ |
| not | ! |
| not_eq | != |
| or | || |
| or_eq | |= |
| xor | ^ |
| xor_eq | ^= |
C++
The abovementioned 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 standard provides the header <ciso646>. However the latter file has no effect, being empty.[1] Notwithstanding some compilers, such as Microsoft Visual C++, do require the header to be included in order to use these identifiers.
See also
References
- ^ Lischner, Ray (2003). C++ in a Nutshell. O'Reilly Media. p. 212. ISBN 0-596-00298-X [Amazon-US | Amazon-UK].
External links
- : alternative spellings – Base Definitions Reference, The Single UNIX® Specification, Issue 7 from The Open Group