/* LOAD_FILE.P */ section $-load_file => load_file; /* SPECIFICATION ------------- This module exports a procedure to load a library file. In Eden, I use it for loading worlds and the code of bugs. PUBLIC load_file( file, ext, path ): -file- is the name of a file; it must be a string or word. -ext- is an extension. -load_file- looks for the file in -path-, which must be a string containing a Unix-style path. If it finds the file, it returns its full name, otherwise false. If the file has no extension, the extension is defaulted to -ext-. This should contain the dot. */ define global load_file( File, Ext, Path ); lvars File, Ext, Path; lvars FullName; if not( issubstring(Ext,File) ) then if Ext /= '' then File> File endif; endif; return( sys_search_unix_path( File, Path ) ); enddefine; endsection;