Alternative operator representations
De cppreference.com.
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
C + + (et C) le code source peut être écrit dans n'importe quel jeu de caractère non-ASCII 7 bits qui comprend le jeu de caractères ISO 646/ECMA-6 invariant. Cependant, plusieurs opérateurs C + + et ponctuation nécessitent des caractères qui sont en dehors du jeu de codes ISO 646:
{, }, [, ], #, \, ^, |, ~. Pour être en mesure d'utiliser les codages de caractères, où tout ou partie de ces symboles n'existent pas en C + + définit deux types de solutions: mots-clés supplémentaires qui correspondent aux opérateurs qui utilisent ces caractères et combinaisons spéciales de deux ou trois ISO 646 caractères compatibles qui sont interprétés comme s'il s'agissait d'une seule non-ISO 646 .Original:
C++ (and C) source code may be written in any non-ASCII 7-bit character set that includes the ISO 646/ECMA-6 invariant character set. However, several C++ operators and punctuators require characters that are outside of the ISO 646 codeset:
{, }, [, ], #, \, ^, |, ~. To be able to use character encodings where some or all of these symbols do not exist, C++ defines two kinds of alternatives: additional keywords that correspond to the operators that use these characters and special combinations of two or three ISO 646 compatible characters that are interpreted as if they were a single non-ISO 646 character.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Sommaire |
[modifier] Mots-clés alternatifs
Il ya d'autres orthographes de plusieurs opérateurs définis comme mots-clés dans le standard C + + .
Original:
There are alternative spellings for several operators defined as keywords in the C++ standard.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Primary | Alternative |
|---|---|
&&
|
and
|
&=
|
and_eq
|
&
|
bitand
|
|
|
bitor
|
~
|
compl
|
!
|
not
|
!=
|
not_eq
|
| || | or |
|=
|
or_eq
|
^
|
xor
|
^=
|
xor_eq
|
[modifier] Compatibilité avec C
Les mêmes mots sont définis dans le langage de programmation C dans le fichier include <iso646.h> sous forme de macros. Parce que dans C + + ce sont des mots clés du langage, la version C + + de <iso646.h>, ainsi que <ciso646>, ne définit rien .
Original:
The same words are defined in the C programming language in the include file <iso646.h> as macros. Because in C++ these are language keywords, the C++ version of <iso646.h>, as well as <ciso646>, does not define anything.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifier] Digrammes et trigraphes
Les combinaisons de deux ou trois caractères (digrammes et trigraphes) sont des substitutions valides pour leurs personnages principaux:
Original:
The following combinations of two and three characters (digraphs and trigraphs) are valid substitutions for their respective primary characters:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Primary | Digraph | Trigraph |
|---|---|---|
{ |
<% |
??<
|
None} |
%> |
??>
|
[ |
<: |
??(
|
] |
:> |
??)
|
# |
%: |
??=
|
\ |
??/
| |
^ |
??'
| |
| |
??!
| |
~ |
??-
|
[modifier] Mots-clés
and, and_eq, bitand, bitor, compl, not, not_eq, or, or_eq, xor, xor_eq
[modifier] Exemple
L'exemple suivant illustre l'utilisation de mots-clés alternatifs plusieurs:
Original:
The following example demonstrates the use of several alternative keywords:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
%:include <iostream> int main(int argc, char *argv<::>) <% if (argc > 1 and argv<:1:> not_eq '\0') <% std::cout << "Hello " << argv<:1:> << '\n'; %> %>