🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #650

Re: WHAT COULD BE WRONG?

#650
From: Bob Schor
Date: Thu, 18 May 2000 00:00
20 lines
1061 bytes
     Try reordering your recursion logic.

PROCEDURE lookup;

BEGIN   { lookup }
  getinputfromuser;
  IF validinput
   THEN
     BEGIN
       lookitup;
       lookup  { recursive call here }
     END
  END;

Note that it is also pretty easy to convert this recursive routine to an
iterative one, which may have some advantages (for one thing, the stack won't
keep growing).

Bob Schor
Pascal Enthusiast
Technical Details
Message-ID: <39241C45.951B7E4F@pitt.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <D0OU4.6707$C9.118410@news1.online.no>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111659,1d4aea8798c741f5
X-Google-Attributes: gid111659,public
X-Google-Thread: 1097b9,1d4aea8798c741f5
X-Google-Attributes: gid1097b9,public
From: Bob Schor <bschor@pitt.edu>
Subject: Re: WHAT COULD BE WRONG?
Date: 2000/05/18
Message-ID: <39241C45.951B7E4F@pitt.edu>
X-Deja-AN: 625046755
Content-Transfer-Encoding: 7bit
References: <D0OU4.6707$C9.118410@news1.online.no>
X-Accept-Language: en,pdf
Content-Type: text/plain; charset=us-ascii
Organization: University of Pittsburgh
Mime-Version: 1.0
Newsgroups: comp.lang.pascal.borland,dk.edb.programmering.pascal