home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / ada / 3883 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1011 b   |  38 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!swillden
  3. From: swillden@news.ccutah.edu (Shawn Willden)
  4. Subject: Mixing logical operators
  5. Message-ID: <1993Jan5.180216.7426@fcom.cc.utah.edu>
  6. Sender: news@fcom.cc.utah.edu
  7. Organization: University of Utah Computer Center
  8. X-Newsreader: Tin 1.1 PL3
  9. Date: Tue, 5 Jan 93 18:02:16 GMT
  10. Lines: 26
  11.  
  12. My copy of the Ada standard (ANSI/MIL-STD-1815A) says in 4.5.4:
  13.  
  14.     ...for a sequence of operators of the same precedence level,
  15.     the operators are associated in textual order from left to
  16.     right...
  17.  
  18. which indicates to me that 
  19.  
  20.       if i=5 and j=2 or k=3 then
  21.       ...
  22.  
  23. should be interpreted as 
  24.  
  25.        if (i=5 and j=2) or k=3 then
  26.  
  27. but the VAX Ada compiler complains that logical operators cannot be
  28. intermixed.
  29.  
  30. Is the VAX compiler wrong?  Am I reading the appropriate part of the 
  31. standard?
  32.  
  33. Shawn.
  34.  
  35. --
  36. Shawn Willden
  37. swillden@icarus.weber.edu
  38.