lace.text.forge: Add a procedure to store a string in a file.

This commit is contained in:
Rod Kay
2022-08-28 22:30:59 +10:00
parent dd7b02578f
commit 792830405d
2 changed files with 17 additions and 0 deletions

View File

@@ -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
-- --

View File

@@ -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
-- --