guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (load) Question


From: Dale P. Smith
Subject: Re: (load) Question
Date: Wed, 19 Feb 2003 09:21:38 -0500

On Wed, 19 Feb 2003 14:13:33 +0100
Andreas Rottmann <address@hidden> wrote:

> Egil Moeller <address@hidden> writes:
> 
> >> Why nuisance?  Load reads a whole file which may contain zero
> >> or more definitions and zero or more expression.  Choseing
> >> one that gets returned would be kind of arbitrary, and then
> >> what do you do if there are no expression?
> >
> > What is the retun-value of a function? A function might contain multiple
> > definitions and expressions, too. The value is the value of the last one.
> > Why not have the same deifinition for load? And if there are not
> > expressions, then, just let the value returned be undefined or whatever.
> > As (load) is defined in teh standard to return an undefined value, this
> > could very well be specified as an extenssion, without breaking the
> > standard. Perheaps as an SRFI?
> >
> I would second that, as I have hacked up a modified version of load
> for use in my code (at the C level) that does exactly that.

How about a lower level routine that returns that last expression.  You
would then have load call that and just return SCM_UNDEFINED.

-Dale

-- 
Dale P. Smith
Senior Systems Consultant,      | Treasurer,
Altus Technologies Corporation  | Cleveland Linux Users Group
address@hidden            | http://cleveland.lug.net
440-746-9000 x239               |




reply via email to

[Prev in Thread] Current Thread [Next in Thread]