gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Round IV: xl and all that (looking ahead, mostly)


From: Peter Conrad
Subject: Re: [Gnu-arch-users] Round IV: xl and all that (looking ahead, mostly)
Date: Mon, 26 Jul 2004 10:00:20 +0200
User-agent: Mutt/1.4i

Hi,

sorry if this is a really dumb question... the days when I was forced to
"learn" LISP are long gone... (yes, I know xl1 is not LISP).

On Fri, Jul 23, 2004 at 06:55:59PM -0700, Tom Lord wrote:
> 
>       (define main 
>           (exit (and (print "hello")
>                      (print " ")
>                      (print "world\(nl)"))))

To me it is not obvious when an expression in () is evaluated. Obviously,
in the example above, the (exit ...) is not evaluated as part of the
execution of the (define ...) expression (because that would mean the end
of execution and not an assignment).

However, (exit (print "hello")) *would* evaluate the argument when the
entire expression is evaluated. And I assume that 
(and (print "hello") (print " ")) would evaluate its arguments in order until
one such argument evaluates to false.

So my question is: since there are no syntactic hints on the order of
evaluation, is there some general rule that I have missed, or does the
programmer have to "just know" how different expressions are evaluated?

Bye,
        Peter
-- 
Peter Conrad                        Tel: +49 6102 / 80 99 072
[ t]ivano Software GmbH             Fax: +49 6102 / 80 99 071
Bahnhofstr. 18                      http://www.tivano.de/
63263 Neu-Isenburg

Germany




reply via email to

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