Previous topic | Ada Home Page | Index

Scope example

 1    with TEXT_IO; use TEXT_IO;
 2
 3    procedure main is
 4
 5        length : constant := 4;
 6        str    : string (1..length);
 7        num    : INTEGER;
 8
 9
10        procedure one (num, len : in INTEGER) is
11
12           str : string (1..10);
13
14        begin -- one
15            ... ... ... ...
16        end one;
17
18
19        X, Y : FLOAT;
20
21
22        procedure two (len : in INTEGER) is
23
24           X : INTEGER;
25
26        begin -- two
27            ... ... ... ...
28        end two;
29
30
31    begin -- main
32        ... ... ... ...
33    end main;


Visibility of each name

name line one two main
PUT, etc1yesyesyes
length5yesyesyes
str6noyesyes
num7noyesyes
num10yesnono
len10yesnono
str12yesnono
X19nonoyes
Y19noyesyes
len22noyesno
X24noyesno


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