[question]userRPL, functions or (sub)subprograms and directories
|
03-29-2017, 05:39 PM
Post: #10
|
|||
|
|||
RE: [question]userRPL and functions or (sub)subprograms
(03-29-2017 04:42 PM)pier4r Wrote: Is it defined in the manuals or is it something that the community discovered and was underdocumented? It's defined in the 50g Users Guide (English version) on page 21-4, and I believe in other documents as well. Sometimes sample code can show how things work more clearly than lengthy descriptions: Code: %%HP: T(3)A(R)F(.); Running "test" in each directory will give different results due to the variables "foo" and "bar" being redefined. Note that neither the function calls nor the variable references need paths -- the O/S simply looks for the named objects and executes the first one it finds with that name in the current search path. This example shows another important concept to keep in mind: while "test" in dir2 and dir3 is actually running a program (foobar) that resides in a higher level directory, the search path that applies is whichever one was current when you started "test" -- not the path starting from the location of "foobar". The current path always starts at the current directory that the user sets, unless (of course) the program explicitly changes that. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)