Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bionet!ames!ncar!boulder!unicads!les From: les@unicads.UUCP (Les Milash) Newsgroups: comp.lang.scheme Subject: Opening files with Cscheme Summary: helllllp! Message-ID: <553@unicads.UUCP> Date: 13 Jul 89 18:36:08 GMT References: Reply-To: les@unicads.UUCP (Les Milash) Organization: Unicad Boulder, CO Lines: 28 i have a thing called CScheme, which i love. i have a manual called RRRS. i have a problem. i'm trying to write a program that's c-preprocessor compatable, in that it takes a -I/parameter -I/that/lists/a/bunch -I/of/directories/that include files might be in. so when the code includes foo.h i have to find the first one of /parameter/foo.h /that/lists/a/bunch/foo.h /of/directories/that/foo.h that exists. RRRS talks about (open-input-file "filename") but if the file doesn't exist i get an "out of range with "filename"" error and the program stops. is there a way to figure out if some file exists without crashing? or some way to substitute some better error behaviour (i'd just as soon have it return '() or #!the-you-screwed-up-object or something). i have the CScheme source and am not adverse to making myself un-scheme- compatable (but i imagine that scheme can do what i want somehow (else what good is it?)) thanks in advance for the assistance! Les Milash wow! with a language like this, i might even be able to handle a shared-memory multiprocessor!