home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / shell / 5303 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  1.0 KB

  1. Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
  2. From: davidsen@ariel.crd.GE.COM (william E Davidsen)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: ksh: expression eval feature or bug?
  5. Message-ID: <1993Jan7.172332.10871@crd.ge.com>
  6. Date: 7 Jan 93 17:23:32 GMT
  7. References: <C0GF6p.JxJ@cmptrc.lonestar.org>
  8. Sender: usenet@crd.ge.com (Required for NNTP)
  9. Reply-To: davidsen@crd.ge.com (bill davidsen)
  10. Organization: GE Corporate R&D Center, Schenectady NY
  11. Lines: 17
  12. Nntp-Posting-Host: ariel.crd.ge.com
  13.  
  14. In article <C0GF6p.JxJ@cmptrc.lonestar.org>, marc@cmptrc.lonestar.org (Marc Elewitz) writes:
  15.  
  16. | $print $(((1+2)))
  17. | + print 3
  18. | 3
  19. |     Although '((1+2))' sends nothing to stdout, 'print $(((1+2)))' displays
  20. |     the expression result.  Why??
  21.  
  22.   You're misreading the expression. Parenthesis are allowed in
  23. expressions, so you're evaluating the expression (1+2) which has a
  24. result very similar to 1+2 without the parens.
  25.  
  26.  
  27. -- 
  28. bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
  29.     Keyboard controller has been disabled, press F1 to continue.
  30.