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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,68e7fcc642995ece,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-05 10:45:08 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!newsone.net!newsone.net!not-for-mail From: adam@irvine.com Newsgroups: comp.lang.ada Subject: Calling through function pointer--syntax question Followup-To: comp.lang.ada Date: 5 Jun 2001 17:43:18 GMT Organization: NewsOne.Net - Free Usenet News via the Web - http://newsone.net/ Message-ID: <9fj5nm$sg0$1@news.netmar.com> NNTP-Posting-Host: news.netmar.com X-Trace: news.netmar.com 991762998 29184 205.139.138.14 (5 Jun 2001 17:43:18 GMT) X-Complaints-To: abuse@newsone.net NNTP-Posting-Date: 5 Jun 2001 17:43:18 GMT X-PNG: comp.lang.ada X-NewsOnePostHost: larry-rp.irvine.com X-NewsOnePostAddr: 63.206.153.98 X-NOTrace: FDHKJKFKOKOPKCGCLCHLLLBKHGJCIDJB Xref: archiver1.google.com comp.lang.ada:8181 Date: 2001-06-05T17:43:18+00:00 List-Id: Is the last procedure call in the program ambiguous? If this is a legal program, what should it do? -- thanks, Adam with text_io; use text_io; procedure test is type func_ptr is access function (param : integer) return integer; procedure P (x : in integer); procedure P (x : in func_ptr); function func1 (param : integer) return integer; function func (y : integer := 4) return func_ptr is begin text_io.put_line ("func parameter is " & integer'image (y)); return func1'access; end func; procedure P (x : in integer) is begin text_io.put_line ("P with integer parameter called: " & integer'image (x)); end P; procedure P (x : in func_ptr) is begin text_io.put_line ("P with function parameter called"); end P; function func1 (param : integer) return integer is begin text_io.put_line ("func1 parameter is " & integer'image (param)); return param * 2; end func1; begin P (func (5)); -- IS THIS AMBIGUOUS? end test; ----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web ----- http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups NewsOne.Net prohibits users from posting spam. If this or other posts made through NewsOne.Net violate posting guidelines, email abuse@newsone.net