From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,FROM_ADDR_WS autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 27 Sep 92 20:07:05 GMT From: cis.ohio-state.edu!news.sei.cmu.edu!ae@ucbvax.Berkeley.EDU (Arthur Evans ) Subject: Re: converting (limited) private types? Message-ID: <1992Sep27.200705.12535@sei.cmu.edu> List-Id: andrewd@cs.adelaide.edu.au (Andrew Dunstan) asks about a stack of items of type Text_IO.File_Type, which is limited private. It would be hard to do if you are using a stack package. However, if you implement the stack as an array and an index (probably reasonable in your case), just open the file right into the stack. Leaving out a lot, like this: File_Stack: array(0..File_Stack_Max) of Text_IO.File_Type; Current_File: integer := 0; -- Current item in File_Stack ... -- Opening intial file Text_IO.Open(File_Stack(Current_File), Text_IO.In_File, ... -- Reading the file (can be simplified with Set_Input) Text_IO.Get_Line(File_Stack(Current_File), ... -- Processing %include (or whatever) Current_File := Current_File + 1; Text_IO.Open(File_Stack(Current_File), Text_IO.In_File, ... ... -- process the file ... Text_IO.Close(File_Stack(Current_File)); Current_File := Current_File - 1; You can easily fill in the details. Art Evans ---------------------------------------------- Arthur Evans, Jr, PhD Ada Consultant 461 Fairview Road Pittsburgh PA 15238-1933 412-963-0839 ae@sei.cmu.edu