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=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 29 Sep 92 20:00:57 GMT From: eachus@mitre-bedford.arpa (Robert I. Eachus) Subject: Re: converting (limited) private types? Message-ID: List-Id: The most elegant way to solve this problem, and I do it every time I have to do a lot of text file manipulation is to take your favorite text editor and edit the specification of TEXT_IO. I usually change the name to NICE_IO and build in whatever processing is necessary to print out meaningful error messages when opening a file fails, etc. In your case, redefine FILE_TYPE as a private type, and then make it an access to TEXT_IO.FILE_TYPE. (If FILE_TYPE is already an access type, there is an obvious optimization...I won't tell.) Now write the body for the most part as calls through to TEXT_IO. Slather pragma INLINE around liberally and you are ready to start cooking. If you want to be a little more adventurous add functions PUSH_CURRENT_IN, etc. to the package. See how easy that was? :-) Seriously this does turn out to be a long term timesaver, since I can and do add dozens of mixed output procedures, GET functions, etc. to the mix. -- Robert I. Eachus with STANDARD_DISCLAIMER; use STANDARD_DISCLAIMER; function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...