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,8c040575fda600b7 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Interface programming Date: 1996/08/19 Message-ID: #1/1 X-Deja-AN: 175262017 references: <4v8pj1$7n2@hermes.acs.unt.edu> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-08-19T00:00:00+00:00 List-Id: Ramesh asks about procedure SOMEPROC is package FORT_LIB is function SQRT(X:FLOAT) return FLOAT; private pragma INTERFACE(FORTRAN, SQRT); end FORT_LIB; NUM : INTEGER; NUMROOT : FLOAT; begin GET(NUM); NUMROOT := SQRT(FLOAT(NUM)); end SOMEPROC; SQRT is not directly visible at the point of call, so the compiler is right to reject it. Indeed the only possible explanation of putting the function inside an internal package is to make sure that it is not directly visible. I suspect some fundamental misunderstanding of Ada visibility rules here!