From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8e4475204234b2fe,start X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: Beginners Ada Question on Ada IO. Date: 1996/12/12 Message-ID: <58pno8$kan@news2.delphi.com>#1/1 X-Deja-AN: 203761255 organization: Delphi Internet Services Corporation newsgroups: comp.lang.ada Date: 1996-12-12T00:00:00+00:00 List-Id: Look up Sequential_IO in your textbook. Sequential_IO is a generic which you instantiate with an IO record type - in your case a record consisting of a single byte. BTW, I note you have an integer with range 0 .. 255. The compiler will not necessarily store that as 8 bits, and the record you write won't necessarily be only 8 bits, unless you define a type and use a 'size clause to force it to 8 bits. Also, your C-Ada code does a new_line; do you really want to put CRs/LFs in your binary file? If you use Sequential_IO you will have to do that explicitly by writing a byte (or two) with the right values, rather than letting the system mark end-of-line according to its own conventions.