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,2308afbbe4ecec0b X-Google-Attributes: gid103376,public From: "Steve Doiel" Subject: Re: Subverting 'Access for Sub-programs Date: 1999/08/03 Message-ID: <37a7990a.0@news.pacifier.com>#1/1 X-Deja-AN: 508598419 References: <37A71EF1.2201@dera.gov.uk> X-Trace: 3 Aug 1999 18:36:10 PST, 216.65.141.17 Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Date: 1999-08-03T00:00:00+00:00 List-Id: You already had a number of valid responses to your question, but none seem to subvert the language. I'm not sure mine does, but here goes anyway: For your main procedure use (exactly as shown): with Main_Package; procedure EntryPoint is begin Main_Package.Main; end EntryPoint; For your program use a package spec and body: package Main_Package is procedure Main; end Main_Package; with Database; with Ada.Text_Io; package body Main_Package is package Text_IO renames Ada.Text_IO; procedure Print_If_Even( I : in Integer ) is begin if I rem 2 = 0 then Text_IO.Put_Line( Integer'Image( I ) ); end if; end Print_If_Even; procedure Main is begin Database.Perform( Action => Print_If_Even'Access ); end Main; end Main_Package; In this code use Main_Package.Main as a substitute for your main procedure. This allows you to define Print_If_Even at the library level (outside of any other procedure). FWIW SteveD