4.12 Loading Files
TBoS p.44
The function load loads a file containing a Shen program using the pathname as a string. All files are opened
relative to the value for the home directory. The value of this global is changed by the cd function.
(load "factorial.shen")
factorial
loaded
(factorial 3)
6
(cd "My Workspace")
"My workspace/"
(load "factorial.shen")
OPEN: File "My Workspace/factorial.shen" does not exist
(cd "") \\ resets the home directory to default
""
(load "factorial.shen")
factorial
loaded |
|