home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- 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
- From: swillden@news.ccutah.edu (Shawn Willden)
- Subject: Mixing logical operators
- Message-ID: <1993Jan5.180216.7426@fcom.cc.utah.edu>
- Sender: news@fcom.cc.utah.edu
- Organization: University of Utah Computer Center
- X-Newsreader: Tin 1.1 PL3
- Date: Tue, 5 Jan 93 18:02:16 GMT
- Lines: 26
-
- My copy of the Ada standard (ANSI/MIL-STD-1815A) says in 4.5.4:
-
- ...for a sequence of operators of the same precedence level,
- the operators are associated in textual order from left to
- right...
-
- which indicates to me that
-
- if i=5 and j=2 or k=3 then
- ...
-
- should be interpreted as
-
- if (i=5 and j=2) or k=3 then
-
- but the VAX Ada compiler complains that logical operators cannot be
- intermixed.
-
- Is the VAX compiler wrong? Am I reading the appropriate part of the
- standard?
-
- Shawn.
-
- --
- Shawn Willden
- swillden@icarus.weber.edu
-