Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!ucbvax!agate!shelby!msi.umn.edu!noc.MR.NET!gacvx2.gac.edu!hhdist From: TNAN0@CCVAX.IASTATE.EDU Newsgroups: comp.sys.handhelds Subject: RE: CLEAR-TO-MARK code Message-ID: Date: 29 Jan 91 05:30:00 GMT Lines: 14 To: handhelds@gac.edu Return-path: To: handhelds@gac.edu X-VMS-To: IN%"handhelds@gac.edu" Ok, here's one peraino... << DO RAND UNTIL DUP .999 > END >> Be careful not to use drop end. Assume all values are needed until completion of the program (let's say they would be used in the event that the last value was exactly .999)... This is a simple (and useless) example of a problem that can plague many program writers... Sometimes, a variable number of stack values can be produced each run through a program. Unless the program keeps count, it cannot know how many of its own objects are on the stack. Using DEPTH and DROPN is MUCH simpler than keeping count on the stack... By the way, "drop end" 8 lines up should be "DROPN"... ---Xeno