Post Reply 
Question about lists in plus42
04-01-2023, 12:56 PM
Post: #1
Question about lists in plus42
Apologies for the simple question but I have no experience with lists in Plus42.

I wanted to generate a list of random numbers and return it to the stack.
What would be the best way to do this?
Does anyone have any examples I could look at?
Find all posts by this user
Quote this message in a reply
04-01-2023, 01:47 PM
Post: #2
RE: Question about lists in plus42
Here is a program generating a list of 10 random numbers :
Code:
00 { 24-Byte Prgm }
01▸LBL "RNDLST"
02 10
03 NEWLIST
04▸LBL 01
05 RAN
06 APPEND
07 DSE ST Y
08 GTO 01
09 END

The list commands are in CATALOG>STR.
Find all posts by this user
Quote this message in a reply
04-01-2023, 04:21 PM
Post: #3
RE: Question about lists in plus42
(04-01-2023 01:47 PM)Didier Lachieze Wrote:  Here is a program generating a list of 10 random numbers :
Code:
00 { 24-Byte Prgm }
01▸LBL "RNDLST"
02 10
03 NEWLIST
04▸LBL 01
05 RAN
06 APPEND
07 DSE ST Y
08 GTO 01
09 END

The list commands are in CATALOG>STR.
Thank you very much
Find all posts by this user
Quote this message in a reply
04-01-2023, 07:30 PM
Post: #4
RE: Question about lists in plus42
The list functions in Free42/Plus42 are described here.
Find all posts by this user
Quote this message in a reply
04-02-2023, 06:23 AM (This post was last modified: 04-02-2023 09:48 AM by nickapos.)
Post: #5
RE: Question about lists in plus42
(04-01-2023 07:30 PM)Didier Lachieze Wrote:  The list functions in Free42/Plus42 are described here.

I have seen this, but I was not sure if newlist could accept an argument to create a list with specific name.
Also I have never used DSE before. I have very little experience with RPN programming.
Your example was very helpful.
Thank you very much
Find all posts by this user
Quote this message in a reply
Post Reply 




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