(3) package Ada.Text_IO.Editing is (4) type Picture is private; (5) function Valid (Pic_String : in String; Blank_When_Zero : in Boolean := False) return Boolean; (6) function To_Picture (Pic_String : in String; Blank_When_Zero : in Boolean := False) return Picture; (7) function Pic_String (Pic : in Picture) return String; function Blank_When_Zero (Pic : in Picture) return Boolean; (8) Max_Picture_Length : constant := implementation_defined; (9) Picture_Error : exception; (10) Default_Currency : constant String := "$"; Default_Fill : constant Character := '*'; Default_Separator : constant Character := ','; Default_Radix_Mark : constant Character := '.'; (11) generic type Num is delta <> digits <>; Default_Currency : in String := Text_IO.Editing.Default_Currency; Default_Fill : in Character := Text_IO.Editing.Default_Fill; Default_Separator : in Character := Text_IO.Editing.Default_Separator; Default_Radix_Mark : in Character := Text_IO.Editing.Default_Radix_Mark; package Decimal_Output is function Length (Pic : in Picture; Currency : in String := Default_Currency) return Natural; (12) function Valid (Item : in Num; Pic : in Picture; Currency : in String := Default_Currency) return Boolean; (13) function Image (Item : in Num; Pic : in Picture; Currency : in String := Default_Currency; Fill : in Character := Default_Fill; Separator : in Character := Default_Separator; Radix_Mark : in Character := Default_Radix_Mark) return String; (14) procedure Put (File : in File_Type; Item : in Num; Pic : in Picture; Currency : in String := Default_Currency; Fill : in Character := Default_Fill; Separator : in Character := Default_Separator; Radix_Mark : in Character := Default_Radix_Mark); (15) procedure Put (Item : in Num; Pic : in Picture; Currency : in String := Default_Currency; Fill : in Character := Default_Fill; Separator : in Character := Default_Separator; Radix_Mark : in Character := Default_Radix_Mark); (16) procedure Put (To : out String; Item : in Num; Pic : in Picture; Currency : in String := Default_Currency; Fill : in Character := Default_Fill; Separator : in Character := Default_Separator; Radix_Mark : in Character := Default_Radix_Mark); end Decimal_Output; private ... -- not specified by the language end Ada.Text_IO.Editing;
(18) function Valid (Pic_String : in String; Blank_When_Zero : in Boolean := False) return Boolean;
(20) function To_Picture (Pic_String : in String; Blank_When_Zero : in Boolean := False) return Picture;
(22) function Pic_String (Pic : in Picture) return String; function Blank_When_Zero (Pic : in Picture) return Boolean;
(29) function Length (Pic : in Picture; Currency : in String := Default_Currency) return Natural;
(37) function Valid (Item : in Num; Pic : in Picture; Currency : in String := Default_Currency) return Boolean;
(39) function Image (Item : in Num; Pic : in Picture; Currency : in String := Default_Currency; Fill : in Character := Default_Fill; Separator : in Character := Default_Separator; Radix_Mark : in Character := Default_Radix_Mark) return String;
(41) procedure Put (File : in File_Type; Item : in Num; Pic : in Picture; Currency : in String := Default_Currency; Fill : in Character := Default_Fill; Separator : in Character := Default_Separator; Radix_Mark : in Character := Default_Radix_Mark); procedure Put (Item : in Num; Pic : in Picture; Currency : in String := Default_Currency; Fill : in Character := Default_Fill; Separator : in Character := Default_Separator; Radix_Mark : in Character := Default_Radix_Mark);
(43) procedure Put (To : out String; Item : in Num; Pic : in Picture; Currency : in String := Default_Currency; Fill : in Character := Default_Fill; Separator : in Character := Default_Separator; Radix_Mark : in Character := Default_Radix_Mark);
The value of 30 for Max_Picture_Length is the same limit as in COBOL.
-- Email comments, additions, corrections, gripes, kudos, etc. to:
Magnus Kempe -- Magnus.Kempe@di.epfl.ch