Annotation of OpenXM_contrib/PHC/Ada/Schubert/brackets_io.adb, Revision 1.1.1.1
1.1 maekawa 1: with integer_io; use integer_io;
2: with Standard_Natural_Vectors;
3:
4: package body Brackets_io is
5:
6: procedure get ( b : in out Bracket ) is
7: begin
8: get(Standard_Input,b);
9: end get;
10:
11: procedure get ( b : in out Bracket; sign : out integer ) is
12: begin
13: get(Standard_Input,b,sign);
14: end get;
15:
16: procedure get ( file : in file_type; b : in out Bracket ) is
17:
18: sign : integer;
19:
20: begin
21: get(file,b,sign);
22: end get;
23:
24: procedure get ( file : in file_type; b : in out Bracket;
25: sign : out integer ) is
26:
27: v : Standard_Natural_Vectors.Vector(b'range);
28:
29: begin
30: for i in b'range loop
31: get(file,v(i));
32: end loop;
33: Create(v,b,sign);
34: end get;
35:
36: procedure put ( b : in Bracket ) is
37: begin
38: put(Standard_Output,b);
39: end put;
40:
41: procedure put ( file : in file_type; b : in Bracket ) is
42: begin
43: put(file,"[");
44: for i in b'first..b'last-1 loop
45: put(file,b(i),1);
46: put(file," ");
47: end loop;
48: put(file,b(b'last),1);
49: put(file,"]");
50: end put;
51:
52: end Brackets_io;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>