awk accepts but blows unary negation

Geoff Kuenning geoff at desint.UUCP
Sun Mar 16 10:25:15 AEST 1986


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



More information about the Net.bugs mailing list