Previous topic | Next topic | Ada Home Page | Index

Assignment

perform calculation & save result in a variable

  
   	total_num := number1 + number2;

assignment operator: :=

	
the variable total_num becomes equal to value of number1 plus value of number2

operators include:

	+		addition
	-		subtraction
	*		multiplication
	/		division

An example program shows (among other things) the use of assignment statements that involve some calculation.


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