Yurttas/PL/IL/Ada-95/F/05/00/B/io boolean p.adb

From ZCubes Wiki
Revision as of 05:38, 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.. -- -- Permis...")
(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-- date   : January 1, 1998.
12-- author : Salih Yurttas.
13
14-- io_boolean_p.adb
15
16
17package body IO_Boolean_P is
18
19  package Bool_IO is new Enumeration_IO(Boolean);
20  use Bool_IO;
21
22  function Get_Boolean(Prompt : in String) return Boolean is
23
24    V : Boolean;
25
26  begin
27
28    New_Line;
29    Put(Prompt);
30    Get(V);
31    New_Line;
32
33    return V;
34
35  end Get_Boolean;
36
37  procedure Get_Boolean(Prompt : in String;
38                        V      : out Boolean) is
39  begin
40
41    New_Line;
42    Put(Prompt);
43    Get(V);
44    New_Line;
45
46  end Get_Boolean;
47
48  procedure Put_Boolean(Header : in String;
49                        V      : in Boolean) is
50
51  begin
52
53    New_Line;
54    Put_Line(Header);
55    Put(V);
56    New_Line;
57
58  end Put_Boolean;
59
60end IO_Boolean_P;