Yurttas/PL/IL/Ada-95/F/05/00/R/io record p.adb

From ZCubes Wiki
Revision as of 05:43, 5 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="ada" line start="1" enclose="div">-- -- Copyright (C) 1998 -- All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc.. -- -- Permi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1--
 2-- Copyright (C) 1998
 3-- All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4--
 5-- Permission to use, copy, modify, and distribute this 
 6-- software and its documentation for EDUCATIONAL purposes
 7-- and without fee is hereby granted provided that this 
 8-- copyright notice appears in all copies. 
 9-- 
10-- 
11 
12-- date   : January 1, 1998.
13-- author : Salih Yurttas.
14
15-- io_record_p.adb
16
17
18package body IO_Record_P is
19
20  function Get_Record(Prompt : in String) return R_A_B_C is
21    V : R_A_B_C;
22  begin
23
24    New_Line;
25
26    Put(Prompt);
27    Get(V.A.S);
28    Get(V.B.S);
29    Get(V.C.S);
30    Skip_Line;
31
32    New_Line;
33
34    return V;
35
36  end Get_Record;
37
38  procedure Get_Record(Prompt : in String;
39                       V      : out R_A_B_C) is
40  begin
41
42    New_Line;
43
44    Put(Prompt);
45    Get(V.A.S);
46    Get(V.B.S);
47    Get(V.C.S);
48    Skip_Line;
49
50    New_Line;
51
52  end Get_Record;
53
54  procedure Put_Record(Header : in String;
55                       V      : in R_A_B_C) is
56  begin
57
58    New_Line;
59
60    Put_Line(Header);
61    Put(V.A.S);
62    Put(V.B.S);
63    Put(V.C.S);
64
65    New_Line;
66
67  end Put_Record;
68
69end IO_Record_P;