Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!dsl.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: PUZZLES AND PROBLEMS Message-ID: <1611.UUL1.3#5129@willett.pgh.pa.us> Date: 27 Aug 90 03:30:48 GMT Organization: String, Scotch tape, and Paperclips. (in Pgh, PA) Lines: 37 Date: 08-23-90 (08:01) Number: 3691 (Echo) To: DENNIS RUFFER Refer#: 3684 From: JONAH THOMAS Read: NO Subj: PUZZLES AND PROBLEMS Status: PUBLIC MESSAGE -> : TEST BEGIN CR ." Type in 2 letters " -> KEY KEY SWAP 2DUP - ABS -> CR ." There are " . -> ." characters that seperate the letters " -> EMIT ." and " EMIT AGAIN ; I think it should work, but you should subtract 1 -- 2DUP - ABS 1- to account for the last letter 'counting itself'. I wonder if we really understand this problem? Does it matter about upper and lower case? Oh well.... NET/Mail : The MATRIX (5 Nodes/1.2 Gig) Birmingham, AL (205) 323-2016 Date: 08-23-90 (19:17) Number: 3692 (Echo) To: DENNIS RUFFER Refer#: NONE From: JONAH THOMAS Read: NO Subj: PUZZLES AND PROBLEMS Status: PUBLIC MESSAGE Oops! I was in the shower when I realized that that fix wouldn't work. ABS 1- works for everything except 0 -- when the 2 letters are the same. Then it fails. Maybe ABS DUP 0= + 1- would be better. Funny how much harder it is to do these things as thought problems. Sitting at a keyboard, you'd find the bugs really fast. I met a Fortran programmer last weekend who was kind of indignant that people don't any more think out the whole program before they write any of it, and didn't know quite what to say to him.... NET/Mail : The MATRIX (5 Nodes/1.2 Gig) Birmingham, AL (205) 323-2016 ----- This message came from GEnie via willett through a semi-automated process. Report problems to: uunet!willett!dwp or dwp@willett.pgh.pa.us