newRPL - build 1255 released! [updated to 1299]
|
07-30-2019, 02:10 PM
(This post was last modified: 07-30-2019 02:19 PM by Claudio L..)
Post: #535
|
|||
|
|||
RE: newRPL - build 1255 released! [updated to 1282]
(07-29-2019 10:49 PM)JoJo1973 Wrote:(07-28-2019 02:05 AM)Claudio L. Wrote: Basically you provide a name of a directory or a path (double list, same format used for STO) and do PACKDIR. Yes, there's a special syntax for paths. The reason being that I wanted RCL and STO to be able to do list processing just like every other command, for consistency. The problem is, because RCL and STO "normally" would interpret a list as a path instead of as a list of names, list processing was not possible. So I tweaked the syntax a little bit: Paths must be expressed as list of lists: { { HOME 'MyDIR' } }, so if STO receives a list of lists, it will consider it a path and will store a single object in level 2 into the single variable given by the path. Otherwise it will consider it a list of names and will take a list in level 2 with the same number of elements, performing a multiple STO into the current directory. There's a couple of limitations to this syntax: * The first name of the list of names can't be a path, others can be paths (always use a list of list for paths, even within the list of names) * If you provide a single object and a list of names, the same object will be stored in all the names (useful to zero-out many variables at once when you start your program). However, that object cannot be a list otherwise each element will be stored in a separate variable. This means you can't store the same list to multiple variables. I know it departs from the standard, but it's useful to have list processing on STO and RCL. EDIT: Since we are already touching the topic, there's another enhancement in paths: UPDIR can be used anywhere within a path just like you would use "..": Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)