Previous topic | Next topic | Ada Home Page | Index

If-then-else statements

An if-then-else statement is needed when the program specification indicates alternative actions.

Statement form


	statement_before;

	if test then
		statements(s)_1;
	else
		statements(s)_2;
	end if;

	statement_after;

An example program traces the development of a program that requires an if-then-else statement.

Statement semantics

Layout convention


Previous topic | Next topic | Ada Home Page | Index
c-lokan@adfa.oz.au / 13 Feb 96