lace.text.forge: Add a procedure to store a string in a file.
This commit is contained in:
@@ -49,6 +49,20 @@ is
|
|||||||
end to_Text;
|
end to_Text;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
procedure store (Filename : in forge.Filename; the_String : in String)
|
||||||
|
is
|
||||||
|
use ada.Text_IO;
|
||||||
|
|
||||||
|
File : File_type;
|
||||||
|
begin
|
||||||
|
create (File, out_File, String (Filename));
|
||||||
|
put (File, the_String);
|
||||||
|
close (File);
|
||||||
|
end store;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- Stock Items
|
-- Stock Items
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ is
|
|||||||
function to_Text (Filename : in forge.Filename) return Item; -- Converts 'CR & LF' to 'LF' at the end of a line.
|
function to_Text (Filename : in forge.Filename) return Item; -- Converts 'CR & LF' to 'LF' at the end of a line.
|
||||||
|
|
||||||
|
|
||||||
|
procedure store (Filename : in forge.Filename; the_String : in String);
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- Stock Items
|
-- Stock Items
|
||||||
--
|
--
|
||||||
|
|||||||
Reference in New Issue
Block a user