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,12283be683f6446b,start X-Google-Attributes: gid103376,public From: "Bruce Detter" Subject: GNAT Stream Read processing problem Date: 1999/01/05 Message-ID: <76tsgd$s0o1@svlss.lmms.lmco.com>#1/1 X-Deja-AN: 429134168 Organization: Lockheed Martin Corporation X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: comp.lang.ada Date: 1999-01-05T00:00:00+00:00 List-Id: I am using GNAT 3.10p on NT4.0. I have the following code written to read a binary file: type Position is record x, y: Float; end record; type PositionArray is array (1 .. 5000) of Position; type Data_Points is record elements: Long_Integer; PS: PositionArray; end record; type DataArray is array (1 .. 256) of Data_Points; Data: DataArray; ndx: Long_Integer := 0; procedure LoadData is Dat: File_Type; S: Stream_Access; i: Long_Integer; begin Open(Dat, In_File, "Data.bin"); S := Stream(Dat); while not End_Of_File(Dat) loop Long_Integer'Read(S, Data(ndx).elements); for i in 1 .. Data(ndx).elements loop Float'Read(S, Data(ndx).PS(i).x); Float'Read(S, Data(ndx).PS(i).y); end loop; ndx := ndx + 1; end loop; Close(Map); end LoadData; When I compile this no matter what type is specified for the Read attribute and the data element to be read into, I get the following errors three times: ... expected type "Standard.Integer" ... found type "Standard.Long_Integer" and it points me to the second parameter of each 'Read. Can someone suggest what it is I'm doing wrong. Thanks in advance... BCD3