Back to table

Multiple Declarations

The following is a valid µOCCAM program. This program test multiple declarations of integers and assignment statements.

Program file: /public/cs3/web/ipptests/mult_decl.accept
INT partcost = 5:      -- unit cost for part
INT quantity = 10:     -- number of parts required
INT totalcost:         -- total cost for parts

totalcost := partcost*quantity