Go to the first, previous, next, last section, table of contents.


General Search Paths

Your application may need to search files in sevaral directories, like included does. For this purpose you can define and use your own search paths. Create a search path like this:


Make a buffer for the path:
create mypath   100 chars ,     \ maximum length (is checked)
                0 ,             \ real len
                100 chars allot \ space for path

You have the same functions for the forth search path in a generic version for different paths.

path+       path-addr  "dir" --         gforth       ``path+''

adds a directory to the search path path-addr

path=       path-addr "dir1|dir2|dir3"         gforth       ``path=''

makes complete new searchpath, seperator is |

.path       path-addr --         gforth       ``.path''

displays the contents of the search path path-addr

open-path-file       adr len path-addr -- fd adr1 len2 0 | ior         gforth       ``open-path-file''

looks in path path-addr for the file specified by adr len when found the resulting path and an open file descriptor is returned. If the file is not found ior is non zero


Go to the first, previous, next, last section, table of contents.