* [9fans] rc - no continue, next in a loop
@ 2009-05-11 10:48 Rudolf Sykora
2009-05-11 12:23 ` erik quanstrom
0 siblings, 1 reply; 2+ messages in thread
From: Rudolf Sykora @ 2009-05-11 10:48 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hello everyone,
I just realized there are no 'continue' and 'next' commands in rc. Is
there any way to e.g. quit the loop when one wants?
Thanks
Ruda
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9fans] rc - no continue, next in a loop
2009-05-11 10:48 [9fans] rc - no continue, next in a loop Rudolf Sykora
@ 2009-05-11 12:23 ` erik quanstrom
0 siblings, 0 replies; 2+ messages in thread
From: erik quanstrom @ 2009-05-11 12:23 UTC (permalink / raw)
To: 9fans
> Hello everyone,
>
> I just realized there are no 'continue' and 'next' commands in rc. Is
> there any way to e.g. quit the loop when one wants?
there are some workarounds, but in the end i added a break
statement to rc. inside rc's machine, i implemented break as
jump to the statement after the loop. the target address is
backpatched. it wouldn't be hard to add other control flow
statements but i didn't provide a mechanism for backpatching
more than one address. i couldn't justify more control flow
statements at the time and so i didn't generalize. the code
is in /n/sources/contrib/quanstro/futharc.c. most of the
interesting stuff is in *.y and code.c. beware, this code is
out of date right now.
- erik
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-11 12:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-11 10:48 [9fans] rc - no continue, next in a loop Rudolf Sykora
2009-05-11 12:23 ` erik quanstrom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).