Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #57306
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: [Random] Escape the trolls |
| Date | 2017-04-14 15:30 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <ocr7qq$v53$1@dont-email.me> (permalink) |
| References | <34338c58-a550-47e6-ae8f-ed33234a7792@googlegroups.com> <2954df4e-7734-40fb-a025-62fa717ec1dc@googlegroups.com> <a21421a5-9168-4083-859f-885dc4f480f9@googlegroups.com> |
On 4/14/2017 2:26 PM, Julian Fondren wrote: > On Friday, April 14, 2017 at 12:53:22 PM UTC-5, NN wrote: >> Hi Julian, >> >> When I compile I find there are values left on the stack. I traced it back to troll, >> >> Can you tell me if this behaviour happens on yours too and not because I am using win32forth ? > > No, that happens for me as well when I INCLUDE the source. > I'd been testing in a way that cleared the stack, unfortunately. > > Corrected TROLL, > > : troll, ( -- ) > begin > maze /maze -trailing nip -maze / choose -maze * maze + > -maze -trailing choose + > > dup c@ bl = over player @ <> and > if dup , [char] T swap c! exit then > drop again ; > > Somehow only gforth noticed the stack underflow in MEANDER > Fixed by removing the ELSE DROP in the last line: > > : meander ( -- ) > trolls 3 cells bounds do i @ if > 4 choose case > 0 of 1 endof > 1 of -1 endof > 2 of -maze endof > 3 of -maze negate endof > endcase i stagger > then cell +loop ; > >> Other than that it works. >> Thanks for the game >> >> NN > > The bug that lets you break out of the maze, I'm leaving in :) > > Please feel free to modify it to make it more interesting. Not sure what I'm doing wrong. When I try to compile the updated code Win32Forth 6.15.03 crashes while compiling the word "step". Well, I added debugging statements to narrow down the problem piece-wise and the problem seems to be that s\" is not defined in Win32Forth and I guess the rest of the line somehow is crashing Win32Forth. When I type in a definition with that code Win32forth simply complains that s\" is not found. Any ideas? -- Rick C
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[Random] Escape the trolls Julian Fondren <julian.fondren@gmail.com> - 2017-04-13 22:46 -0700
Re: [Random] Escape the trolls NN <november.nihal@gmail.com> - 2017-04-14 10:53 -0700
Re: [Random] Escape the trolls Julian Fondren <julian.fondren@gmail.com> - 2017-04-14 11:26 -0700
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-14 15:30 -0400
Re: [Random] Escape the trolls Julian Fondren <julian.fondren@gmail.com> - 2017-04-14 12:45 -0700
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-14 16:02 -0400
Re: [Random] Escape the trolls NN <november.nihal@gmail.com> - 2017-04-14 13:13 -0700
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-14 16:18 -0400
Re: [Random] Escape the trolls NN <november.nihal@gmail.com> - 2017-04-14 13:25 -0700
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-14 16:49 -0400
Re: [Random] Escape the trolls Alex <alex@rivadpm.com> - 2017-04-14 21:59 +0100
Re: [Random] Escape the trolls josv@planet.nl - 2017-04-15 04:09 -0700
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-15 12:45 -0400
Re: [Random] Escape the trolls Coos Haak <htrofhc@gmail.com> - 2017-04-15 18:50 +0200
Re: [Random] Escape the trolls NN <november.nihal@gmail.com> - 2017-04-15 15:45 -0700
Re: [Random] Escape the trolls hughaguilar96@gmail.com - 2017-04-14 14:46 -0700
Re: [Random] Escape the trolls Julian Fondren <julian.fondren@gmail.com> - 2017-04-14 15:35 -0700
Re: [Random] Escape the trolls hughaguilar96@gmail.com - 2017-04-14 16:24 -0700
Re: [Random] Escape the trolls Alex <alex@rivadpm.com> - 2017-04-15 00:34 +0100
Re: [Random] Escape the trolls Alex <alex@rivadpm.com> - 2017-04-15 00:36 +0100
Re: [Random] Escape the trolls hughaguilar96@gmail.com - 2017-04-14 20:58 -0700
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-15 00:24 -0400
Re: [Random] Escape the trolls hughaguilar96@gmail.com - 2017-04-14 21:40 -0700
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-15 02:32 -0400
Re: [Random] Escape the trolls anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-15 07:50 +0000
Re: [Random] Escape the trolls anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-15 08:15 +0000
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-15 13:10 -0400
Re: [Random] Escape the trolls Coos Haak <htrofhc@gmail.com> - 2017-04-15 19:27 +0200
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-15 14:25 -0400
Re: [Random] Escape the trolls anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-17 14:05 +0000
Re: [Random] Escape the trolls "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-16 01:42 +0000
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-15 21:51 -0400
Re: [Random] Escape the trolls "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-16 02:10 +0000
Re: [Random] Escape the trolls Coos Haak <htrofhc@gmail.com> - 2017-04-16 14:29 +0200
Re: [Random] Escape the trolls "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-16 13:58 +0000
Re: [Random] Escape the trolls anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-16 16:11 +0000
Re: [Random] Escape the trolls "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-16 22:18 +0000
Re: [Random] Escape the trolls Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2017-04-17 07:54 +0100
Re: [Random] Escape the trolls "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-17 23:32 +0000
Re: [Random] Escape the trolls "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-04-17 23:33 +0000
Re: [Random] Escape the trolls Julian Fondren <julian.fondren@gmail.com> - 2017-04-14 22:33 -0700
Re: [Random] Escape the trolls Julian Fondren <julian.fondren@gmail.com> - 2017-04-14 22:52 -0700
Re: [Random] Escape the trolls anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-15 07:52 +0000
Re: [Random] Escape the trolls Alex <alex@rivadpm.com> - 2017-04-15 11:20 +0100
Re: [Random] Escape the trolls anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-15 11:53 +0000
Re: [Random] Escape the trolls Alex <alex@rivadpm.com> - 2017-04-15 19:10 +0100
Re: [Random] Escape the trolls anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-17 14:19 +0000
Re: [Random] Escape the trolls Bernd Linsel <bl1@gmx.com> - 2017-04-15 20:21 +0200
Re: [Random] Escape the trolls Alex <alex@rivadpm.com> - 2017-04-15 20:33 +0100
Re: [Random] Escape the trolls Bernd Linsel <bl1@gmx.com> - 2017-04-16 11:50 +0200
Re: [Random] Escape the trolls anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-16 14:22 +0000
Re: [Random] Escape the trolls anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-16 14:47 +0000
Re: [Random] Escape the trolls hughaguilar96@gmail.com - 2017-04-15 16:55 -0700
Re: [Random] Escape the trolls hughaguilar96@gmail.com - 2017-04-15 17:03 -0700
Re: [Random] Escape the trolls Alex <alex@rivadpm.com> - 2017-04-15 11:37 +0100
Re: [Random] Escape the trolls Julian Fondren <julian.fondren@gmail.com> - 2017-04-14 16:51 -0700
Re: [Random] Escape the trolls rickman <gnuarm@gmail.com> - 2017-04-14 21:24 -0400
csiph-web