2. Language elements
Language elements consist of reserved words, operators, variables, constants, comments, and punctuation. The combination of these form the syntax of the program.
2.1. Characters
The characters that can be used in the syntax of the language.
-
abcdefghijklmnopqrstu vwxyz
-
ABCDEFGHIJKLMNOPQRSTU VWXYZ
-
0 1 2 3 4 5 6 7 8 9
-
+ - * / = ( ) { } [ ] < > ' ” ! @ - / ^ & % _ : . , ; ? |
- Space and tab
With the combination of characters can be the identifiers that represent the names of variables, constants, etc.. These must begin with a lowercase letter, uppercase or low emphasis. The length can be from one to several characters, not allowing blank spaces or special characters. To remove a handle formed by two words you can use the low bar.
N, i, con
K456, var45
Dato_entrada, precio_producto
The c + + is sensitive to capital letters so that two equal names in upper or lower case are different.
Consigna
is different consigna
2.2. Reserved Words
asm and and_eq
auto bitand bitor
bool break case
catch char class
compl const const_cast
continue default delete
do double dynamic_cast
else enum explicit
export extern false
float for friend
goto if inline
int long mutable
namespace new not
not_eq operator or
or_eq private protected
public register reinterpret_cast
return short signed
sizeof static static_cast
struct switch template
this throw true
try typedef typeid
typename union unsigned
using virtual void
volatile wchar_t while
xor xor_eq