HPlogo HP C/HP-UX Reference Manual: Workstations and Servers

Chapter 6 Statements

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

This chapter describes the statements in the C programming language.

The statements are grouped as follows:

  • Labeled Statements.

  • Compound Statement or Block.

  • Expressions and Null Statement.

  • Selection Statements.

  • Iteration Statements.

  • Jump Statements.

Statements are the executable parts of a C function. The computer executes them in the sequence in which they are presented in the program, except where control flow is altered as specified in this chapter.

Syntax

statement ::=
labeled-statement
compound-statement
expression-statement
selection-statement
iteration-statement
jump-statement

Example

 labl: x=y;
{ int x; x=y; }
x=y;
if (x<y) x=y;
for (i=1; i<10; i++) a[i]=i;
goto labl;