---------------------------------------------------------------------- -- Title : IOInAKD -- Version : 1.0 -- Copyright : (C) 1994 David Wallace Croft. All rights reserved. -- Author : David Wallace Croft, CompuServe [76600,102] -- Compiler : Ada -- Description : Direct console text I/O for integer types. -- Complements TextAKD. ---------------------------------------------------------------------- with TextAKD; -- for types ---------------------------------------------------------------------- -- Universal Integer ---------------------------------------------------------------------- generic type Num is range <>; package IOInAKD is ---------------------------------------------------------------------- ---------------------------------------------------------------------- subtype Field is TextAKD.Field; subtype Number_Base is TextAKD.Number_Base; subtype File_Mode is TextAKD.File_Mode; In_File : constant File_Mode := TextAKD.In_File; Out_File : constant File_Mode := TextAKD.Out_File; subtype File_Type is TextAKD.File_Type; package Num_IO is new TextAKD.Integer_IO_AKD ( Num ); Default_Width : Field := Num'width; Default_Base : Number_Base := 10; ---------------------------------------------------------------------- procedure Ask ( Item : out Num; Prompt : in string := ""; Default : in Num := Num'first; Minimum : in Num := Num'first; Maximum : in Num := Num'last; Width : in Field := Default_Width ); procedure Put_Line ( File : in File_Type; Item : in Num; Width : in Field := Default_Width; Base : in Number_Base := Default_Base ); procedure Put_Line ( Item : in Num; Width : in Field := Default_Width; Base : in Number_Base := Default_Base ); ---------------------------------------------------------------------- ---------------------------------------------------------------------- end IOInAKD;