[comp.sys.amiga.tech] Eval and 2.0

aduncan@rhea.trl.oz (Allan Duncan) (10/23/90)

I recently discovered that the DOS command "eval" has a problem,
specifically, "eval 4 mod 3" returns an answer of 0, rather than the 1
it should.

This did not occur on the 1.3 W/B, but does with the 1.3.2 (which
included a new eval), and 2.0 Beta 5.
Could those with newer versions of 2.0 (2.01, 2.02?) than 36.16 check
and mail me the result (and the version)?

I have mailed bugs@commodore, but not received a reply yet (one of
andy's items to me took a month to bounce!) so I can't be sure it got
through.

Allan Duncan	ACSnet	a.duncan@trl.oz
(03) 541 6708	ARPA	a.duncan%trl.oz.au@uunet.uu.net
		UUCP	{uunet,hplabs,ukc}!munnari!trl.oz!a.duncan
Telecom Research Labs, PO Box 249, Clayton, Victoria, 3168, Australia.

jms@tardis.Tymnet.COM (Joe Smith) (10/23/90)

In article <2383@trlluna.trl.oz> aduncan@rhea.trl.oz (Allan Duncan) writes:
>"eval 4 mod 3" returns an answer of 0, rather than the 1 it should.
>
>This did not occur on the 1.3 W/B, but does with the 1.3.2 (which
>included a new eval), and 2.0 Beta 5.

The new EVAL gives the right results when I use "%" instead of "mod".  It
looks like Commodore needs to update the documentation.  Other observations:

eval ~ 0xf0		= -1	should be 0xffffff0f = -241
eval ~ -1		= -1	should be 0
eval 17 % 5		= 2	correct
eval 4 mod 3		= 0	should be 1
eval 4 foobar 3		= 4	should say "invalid OP"
eval 4 modx 3		= 3	"	"	"
eval 4 garbage 3	= -8	"	"	"
eval 12 xor 5		= 12	should be 9 (1100 xor 0101 = 1001)
eval 12 eqv 5		= -13	should be 6 (1100 eqv 0101 = 0110)
eval 12 & 5		= 4	correct
eval 12 | 5		= 13	correct

This is on an A3000.  C:EVAL $VER: 36.5 (18.4.90)
-- 
Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C41    | BIX: smithjoe | 12 PDP-10s still running! "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga 3000 speaks for me."