Path: utzoo!attcan!uunet!mcsun!mcvax!hp4nl!botter!star.cs.vu.nl!roemer From: roemer@cs.vu.nl (Roemer Lievaart) Newsgroups: comp.lang.c Subject: and then was comma Message-ID: <3038@solo1.cs.vu.nl> Date: 22 Aug 89 23:31:22 GMT References: <63244@linus.UUCP> <2300@oakhill.UUCP> <2650@aplcen.apl.jhu.edu> <20348@sequent.UUCP> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 26 paulr@sequent.UUCP (Paul Reger) writes: >Considering the construction: >while ((ch = getchar()) != EOF && ch != '\n') >Is there any assurance in any C standard that the left expression will >always be evaluated first, with the right following it ?? [ ... ] >I'm from Ada-land where such problems are handled by the 'and then' >clause. Ada first made 'and', like in Pascal, then found out that the '&&' operator of C was also a very good thing and thus introduced the 'and then' operator, which is identical to C's &&. ++===================================================================++ || To askers of trivial questions : || || || || Please first ask someone in your neighbourhood before posting. || ++===================================================================++ ____________________________________________________________________________ Roemer B. Lievaart | Fact is: nature can do without man. Amsterdam, Holland | Man can't do without nature. roemer@cs.vu.nl | -- Tom van Ewijk