expr(1) fails on negative arguments (with fix)

guy at sun.UUCP guy at sun.UUCP
Sun Jun 15 07:27:30 AEST 1986


> < Nice fix. Try "expr -5 * ---6". The problem cannot be correctly fixed
> < w/out going all out and implementing UMINUS is the yacc grammar. Any
> < takers?

> (fixed in S5) Sorry, but I haven't looked at the expr code to see what
> the real fix was.

It may have been to rewrite the whole thing in C.  It had been so rewritten
as of S3, although the S3 version still maintained the old "index",
"substr", and "length" operators from V7, which were undocumented and caused
confusion if those names appeared as operands.  S5 ripped them out.
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy at sun.com (or guy at sun.arpa)



More information about the Net.bugs.v7 mailing list