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,bd0de980b22e8253 X-Google-Attributes: gid103376,public From: davidf@mks.com (David J. Fiander) Subject: Re: Help. Procedure is undefined Date: 1998/01/08 Message-ID: #1/1 X-Deja-AN: 314049856 Sender: davidf@davidf-nt.mks.com References: <34B4C915.4BF8@bton.ac.uk> <34b4f3da.7353367@news.logica.co.uk> Organization: Mortice Kern Systems Inc. Newsgroups: comp.lang.ada Date: 1998-01-08T00:00:00+00:00 List-Id: reply-address-in-sig (Steve Garriga) writes: > > From a glance at your code it seems that you don't understand control > flow. When a procedure or function is called, control is passed with > the intention that control is passed back when the procedure or > function completes. > > So.... what you need if I understand your intention, is a loop in your > main procedure which is terminated by selecting quit, and your other > procedures to just 'return' (i.e. don't attempt to call main, just > complete). Infering backwards from your response, the other possibility is that he's Scheme or Lisp programmer who thinks that the correct way to implement a looping construct is via tail-recursive function calls. In Scheme, the pair of functions (define a (x) (printf "%d\n" x) (b x)) (define b (x) (a (+ 1 x))) will count forever, without ever blowing the stack (ignoring the lack of a real "printf" function, of course). - David