Article View: net.bugs.usg
Article #316Re: expr(1) fails on negative arguments (with fix)
From: guy
Date: Sat, 14 Jun 1986 21:27
Date: Sat, 14 Jun 1986 21:27
15 lines
1227 bytes
1227 bytes
> < 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@sun.com (or guy@sun.arpa)
Technical Details
Message-ID:
<4143@sun.uucp>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!sun!guyReferences:
<270@cirl.UUCP> <219@decvax.UUCP> <2795@pegasus.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!sun!guy From: guy@sun.UUCP Newsgroups: net.bugs.usg,net.bugs.4bsd,net.bugs.v7,net.bugs.2bsd Subject: Re: expr(1) fails on negative arguments (with fix) Message-ID: <4143@sun.uucp> Date: Sat, 14-Jun-86 17:27:30 EDT Article-I.D.: sun.4143 Posted: Sat Jun 14 17:27:30 1986 Date-Received: Tue, 17-Jun-86 22:00:30 EDT References: <270@cirl.UUCP> <219@decvax.UUCP> <2795@pegasus.UUCP> Distribution: net Organization: Sun Microsystems, Inc. Lines: 15