Post Reply 
[question]userRPL, functions or (sub)subprograms and directories
03-29-2017, 03:37 PM
Post: #8
RE: [question]userRPL and functions or (sub)subprograms
(03-29-2017 03:01 PM)pier4r Wrote:  I could use a local var to define the source path and that's it, well actually I never used absolute paths with directories on the 50g.

That's one way to approach it, but not exactly what I meant. Keep in mind that the default search path for objects on the 50g is "current directory or any parent directory of the current one". So you don't have to specify the full path if the item being referenced is located anywhere in that upward-looking default search path.

Objects in any directory are accessible to other objects in that same directory or any of its subdirectories without specifying the full path name. Multiple versions of the same object can be saved in different subdirectories, and the first one found on the search path will be used. This is why an item named 'FOO' stored in the HOME directory can be accessed by any other object (in any subdirectory) simply as 'FOO' (without a path). Objects in the HOME directory are always in the search path.

Note that this behavior can be a mixed blessing, and is quite often the cause of confusion when people have stored objects somewhere in a parent directory and their programs (or built-in functions) access them. Used properly, though, it can be quite powerful.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [question]userRPL and functions or (sub)subprograms - DavidM - 03-29-2017 03:37 PM
about DIR END - pier4r - 03-29-2017, 06:15 PM



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