Previous topic | Next topic | Ada Home Page | Index

Program structure and layout

Program structure

Example

----------------------------------
--      sum_prod -      sum and product
----------------------------------

with ...;
use  ...;

procedure program_name  is

    declare I/O packages
    
    declare constants & variables used

begin --        program_name  

    statements

end program_name ;


Structure

header:

declarations:

statements:

reserved words have special meaning


Layout Conventions

Little restriction on layout of Ada programs

Common layout convention makes programs easier for others to read, understand, maintain (and mark!)

Basic conventions:


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