This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: building lists with gh_load()


Thus spake Lars Arvestad (arve@nada.kth.se):

> A first comment: This really looks like something you'd rather do in
> Scheme than in C. Unless you have removed stuff that makes the whole
> thing C-worthy.

Yes, I removed it. Additionally, this should really become a primitive
function, because it will be used in almost ALL scripts later the
interpreter is for.

But for now I'm doing it in Scheme with some global variables
(ugly...), because ...

> AL> But, unfortunately gh_load _always_ returns SCM_UNSPECIFIED.
> Yup, that is because gh_load is supposed to be the C version of the
> scheme procedure load which according to R5RS should return an
> unspecified value. 

... of this. I dislike this, but if there is no other way :-(

Where's the reason why (load ...) cannot return a value?
I could find it VERY useful.

> because guile-ref.info claims that gh_eval_file returns the value of
> the last evaluated expression.

Uhm. That should be fixed in the next version. (hint! hint!)

> X, then you recursive function could simply cons together the value of 
> X with the list. 

Yes, that's how I do it at the moment... very ugly, but it works.

Alex

-- 
I doubt, therefore I might be. 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]