Article View: net.bugs
Article #502awk accepts but blows unary negation
From: Geoff Kuenning
Date: Sun, 16 Mar 1986 00:25
Date: Sun, 16 Mar 1986 00:25
13 lines
881 bytes
881 bytes
Talk about confusing me! Try this one on your system:
echo 15 | awk '{t1=-15;t2=15;t3=-t2;t4=-$1;print t1,t3,t4}'
On my system (Unisoft V.0) it produces:
-2.71875 -2.71875 -2.71875
The expression "t1=0-15" works correctly.
--
Geoff Kuenning
{hplabs,ihnp4}!trwrb!desint!geoff
Technical Details
Message-ID:
<179@desint.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!lll-crg!lll-lcc!qantel!hplabs!sdcrdcf!trwrb!desint!geoffShow 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!allegra!mit-eddie!think!harvard!seismo!lll-crg!lll-lcc!qantel!hplabs!sdcrdcf!trwrb!desint!geoff From: geoff@desint.UUCP (Geoff Kuenning) Newsgroups: net.bugs Subject: awk accepts but blows unary negation Message-ID: <179@desint.UUCP> Date: Sat, 15-Mar-86 19:25:15 EST Article-I.D.: desint.179 Posted: Sat Mar 15 19:25:15 1986 Date-Received: Tue, 18-Mar-86 07:23:35 EST Reply-To: geoff@desint.UUCP (Geoff Kuenning) Organization: SAH Consulting, Manhattan Beach, CA Lines: 13