Article View: comp.os.ms-windows.programmer.misc
Article #2888Re: int / int ?
From: Chris Marriott
Date: Sun, 29 Nov 1998 00:00
Date: Sun, 29 Nov 1998 00:00
29 lines
1951 bytes
1951 bytes
Tony Street wrote in message <36618e67.0@isc-newsserver.isc.rit.edu>...
>Chris Marriott wrote in message
>>If you don't use parentheses to force the order of evaluation, does the C
>>language guarentee left-to-right evaluation? I don't have a copy of the
>>language reference at hand to check.
>
>Yes..... the C language will follow all precedence rules, all the time..
We're not talking here about precedence, Tony. "*" and "/" have the SAME
precedence.
What I'm asking is, given the expression "a*b/c", is there anything in the
language definition which says that this will be evaluated as:
(a*b)/c
or is the compiler free to evaluate it as:
a*(b/c)
if it wishes to do so?
Chris
-----------------------------------------------------------------------
Chris Marriott, SkyMap Software, UK (chris@skymap.com)
Visit our web site at http://www.skymap.com
Astronomy software written by astronomers, for astronomers
Technical Details
Message-ID:
<912408515.26096.1.nnrp-07.9e9809e7@news.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<366155E6.632A909D@erols.com> <912351722.217465@optional.cts.com> <912357376.6545.0.nnrp-03.9e9809e7@news.demon.co.uk> <36618e67.0@isc-newsserver.isc.rit.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8d38,7450d421b142666f X-Google-Attributes: gidf8d38,public X-Google-Thread: 1014db,7450d421b142666f X-Google-Attributes: gid1014db,public X-Google-Thread: 105df1,7450d421b142666f X-Google-Attributes: gid105df1,public From: "Chris Marriott" <chris@NOSPAM.skymap.com> Subject: Re: int / int ? Date: 1998/11/29 Message-ID: <912408515.26096.1.nnrp-07.9e9809e7@news.demon.co.uk> X-Deja-AN: 417007046 X-NNTP-Posting-Host: chrism.demon.co.uk:158.152.9.231 References: <366155E6.632A909D@erols.com> <912351722.217465@optional.cts.com> <912357376.6545.0.nnrp-03.9e9809e7@news.demon.co.uk> <36618e67.0@isc-newsserver.isc.rit.edu> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 912408515 nnrp-07:26096 NO-IDENT chrism.demon.co.uk:158.152.9.231 Organization: SkyMap Software Newsgroups: comp.os.ms-windows.programmer.misc,borland.public.cpp.language,comp.lang.c