home *** CD-ROM | disk | FTP | other *** search
- -- Chapter 22 - Program 1
- with Text_IO;
- use Text_IO;
- with Sequential_IO;
-
- procedure BiSeqOut is
-
- type MY_REC is
- record
- Age : INTEGER;
- Sex : CHARACTER;
- Initial : CHARACTER;
- end record;
-
- package Seq_IO is new Sequential_IO(MY_REC);
- use Seq_IO;
-
- Myself : MY_REC;
- My_Out_File : Seq_IO.FILE_TYPE;
-
- begin
-
- Create(My_Out_File, Out_File, "NAMEFILE.TXT");
-
- Myself.Sex := 'M';
- Myself.Initial := 'X';
-
- for Index in 1..100 loop
- Myself.Age := Index;
- Write(My_Out_File, Myself);
- end loop;
-
- Close(My_Out_File);
-
- end BiSeqOut;
-
-
-
-
- -- Result of Execution
-
- -- (The only output is a binary file named NAMEFILE.TXT)
-
-