next up previous contents index
Nächste Seite: 3.7.2 Postfixnotation Aufwärts: 3.7 Inkrement- und Dekrementoperatoren Vorherige Seite: 3.7 Inkrement- und Dekrementoperatoren   Inhalt   Index


3.7.1 Präfixnotation

++<lvalue>               // <lvalue> = <lvalue> + 1
--<lvalue>               // <lvalue> = <lvalue> - 1

//     Example: prefix notation
{
 int i=3, j; 
 
 ++i;             // i = 4
 
 j = ++i;         // i = 5, j = 5
                  // above prefix notation is equivalent to
 i = i + 1;
 j = i;
}


Gundolf Haase 2004-01-15