RE: [S] Unusual result -- A glitch, I'd say

Ray Brownrigg (Ray.Brownrigg@mcs.vuw.ac.nz)
Thu, 26 Mar 1998 10:03:03 +1200 (NZST)


> From: "Byers, Bob" <rhb1@cdc.gov>
>
> Apparently S+ is evaluating from left to right and applying the plus
> operator whenever it has two
> valid operands. This is in contrast to FORTRAN which evaluates all inner
> parentheses first.

This is more graphically illustrated (perhaps even 'explained') by:
> a_0
> (0+a)+(a_a+1) ## equivalent to 0+a+(a_a+1)
[1] 1
> a_0
> 0+(a+(a_a+1)) ## equivalent to a+(a_a+1)
[1] 2
>

Ray Brownrigg
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news