Post Reply 
[SOLVED] DSRN (dog slow roman numerals)
06-12-2014, 09:49 PM (This post was last modified: 06-12-2014 09:51 PM by Dave Britten.)
Post: #15
RE: DSRN (dog slow roman numerals)
(06-12-2014 09:17 PM)Thomas Klemm Wrote:  PS: I tried using DOLIST but I failed. However I noticed something I didn't know:
{ 1 2 3 }
1
\<< DUP \>>
DOLIST

This produces:
{ 1 1 2 2 3 3 }

Whatever the program produces will be added to the list. I thought this will lead to:
1
2
3
{ 1 2 3 }

Yeah, DOLIST (and I think maybe DOSUBS) is a little quirky. If the program leaves anything on the stack, the outputs will be collected in a list. Otherwise DOLIST doesn't have any final output.


This example produces just {1 2 3}:

Code:
{ 1 2 3 }
1
\<< \>>
DOLIST

The empty program does nothing and just leaves its one input as an output, which DOLIST obediently collects back into a list.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: DSRN (dog slow roman numerals) - HP67 - 06-11-2014, 07:06 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 11:44 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 04:49 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-15-2014, 12:02 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-16-2014, 06:09 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 05:46 PM
RE: DSRN (dog slow roman numerals) - Dave Britten - 06-12-2014 09:49 PM



User(s) browsing this thread: 3 Guest(s)