HPlogo HP C/HP-UX Reference Manual: Workstations and Servers > Chapter 5 Expressions

Postfix Operators

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

Postfix operators are unary operators that attach to the end of postfix expressions. A postfix expression is any expression that may be legally followed by a postfix operator.

Syntax

postfix-expression ::=
primary-expression
postfix-expression [ expression ]
postfix-expression ( [argument-expression-list] )
postfix-expression . identifier
postfix-expression -> identifier
postfix-expression ++
postfix-expression --

argument-expression-list ::=
assignment-expression
argument-expression-list , assignment-expression

Examples

The following are examples of postfix operators:

The 'element of' operator ([ ])     : array1[10]

The postfix increment operator (++) : index++

The postfix decrement operator (--) : index--

The argument list of function calls : func(arg1,arg2,arg3)

The selection operator (.) : struct_name.member

The selection operator (->) : p_struct->member