From: Jeff Massung
Subject: Order of evaluation
Date: 
Message-ID: <vinng94li1in9e@corp.supernews.com>
I was curious, does the ANS spec on Lisp define the order of evaluation for 
function arguments? For example:

(defun foo-stack-sample (stack)
    	(- (pop stack) (pop stack)))

(foo-stack-example '(10 5)) => ?

Is this guaranteed to evaluate to 5 or -5 (either one)? Or should I stick 
with using an intermediate variable as in C?

-- 
Best regards,
 Jeff                          ··········@mfire.com
                               http://www.simforth.com

From: jimbo
Subject: Re: Order of evaluation
Date: 
Message-ID: <1059842392.77726@ananke.eclipse.net.uk>
Jeff Massung wrote:

> Is this guaranteed to evaluate to 5 or -5 (either one)? Or should I stick 
> with using an intermediate variable as in C?

Yes, it is assured.  Arguments are evaluated left to right.

jimbo
;-)
From: Kalle Olavi Niemitalo
Subject: Re: Order of evaluation
Date: 
Message-ID: <87lluc3r50.fsf@Astalo.kon.iki.fi>
Jeff Massung <···@NOSPAM.mfire.com> writes:

> I was curious, does the ANS spec on Lisp define the order of evaluation for 
> function arguments?

They are evaluated left to right.  This is at 3.1.2.1.2.3
Function Forms.