unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Ignore errors while evaluating with `primitive-eval'
@ 2013-08-19 15:11 Alexandru Cojocaru
  2013-08-19 15:46 ` Mark H Weaver
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Cojocaru @ 2013-08-19 15:11 UTC (permalink / raw)
  To: guile-user

Hi guys,
is it possible to ignore errors when evaluating a badly formed expression?

Take as an example this:

     (let ((cs (string->list "display")))
       (let l ((cs (cdr cs)) (s (car cs)))
         (primitive-eval `(begin
                    (,(list->symbol s) "aha")
                    (newline)))
         (if (not (null? cs))
         (l cs s))))

I would like to ignore all the errors while evaluating `(d "aha")', `(di 
"aha")', `(dis "aha")' etc.
and evaluate only `(display "aha")'.

What I want is to construct some (possibly incorrect) expressions on the 
fly and evaluate them.

Best regards,
Alexandru Cojocaru



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-19 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-19 15:11 Ignore errors while evaluating with `primitive-eval' Alexandru Cojocaru
2013-08-19 15:46 ` Mark H Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).