Tutorial by Examples

The procedures Create, Put_Line, Close from the package Ada.Text_IO is used to create and write to the file file.txt. with Ada.Text_IO; procedure Main is use Ada.Text_IO; F : File_Type; begin Create (F, Out_File, "file.txt"); Put_Line (F, "This string will be writ...
The subtypes' stream-oriented attributes are called to write objects to a file, bare and using binary default representations. with Ada.Streams.Stream_IO; procedure Main is type Fruit is (Banana, Orange, Pear); type Color_Value is range 0 .. 255; type Color is record R, G, B :...
Read the data of Create And Write To A Stream back into a program. with Ada.Streams.Stream_IO; procedure Main is -- -- ... same type definitions as in referenced example -- Fruit_Colors : array (Fruit) of Color; use Ada.Streams.Stream_IO; F : File_Type; X : Fruit...

Page 1 of 1