Article View: comp.lang.modula2
Article #2592Re: Report on defect in M2 vs C (Was Modula-2, Modula-3, C or C++)
From: Neil Tungate
Date: Sun, 08 Oct 1995 11:45
Date: Sun, 08 Oct 1995 11:45
26 lines
1645 bytes
1645 bytes
seebs@solutions.solon.com (Peter Seebach) wrote: >Why not just write > 0 >? It's the same thing. (Hint: 4/32 is 0.) Sorry, you are of course correct where integers are concerned. I was looking at it simplisticly as a maths equation, and should have read Stephen's post more carefully. Then I would have realised he meant: ((2^31) * 4) / 32 (possibly!) >No. You're forcing *precedence*. You aren't touching order of *execution*. >Nothing keeps the compiler from, say, calculating the 4/32 first, or the >2^31 first. (Though I don't see why you don't just *say* 29 * 0.) Sorry again - I was actually thinking of precedence, but my fingers got to the keys before my brain found the word :-) My original idea still stands though - if you use parentheses correctly the equation will be evaluated as you intend, not as the compiler sees fit. -- Neil Team ( Ada => UK ) http://uptown.turnpike.net/~skipper/
Technical Details
Message-ID:
<813152827.1081@skipper.demon.co.uk>Path:
arc1-ca.pugleaf.net!dispatch.news.demon.net!demon!skipper.demon.co.ukReferences:
<Pine.SUN.3.91.951005003000.1000A-100000-100000-100000@lagrange.uwaterloo.ca> <4540ha$hqn@regina.seh.codem.com> <813106607.29468@skipper.demon.co.uk> <4575rs$ang@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!dispatch.news.demon.net!demon!skipper.demon.co.uk From: neil@skipper.demon.co.uk (Neil Tungate) Newsgroups: comp.lang.modula2,comp.lang.modula3,comp.lang.c,comp.lang.c++,comp.lang.ada Subject: Re: Report on defect in M2 vs C (Was Modula-2, Modula-3, C or C++) Date: Sun, 08 Oct 1995 11:45:33 GMT Organization: dnt Message-ID: <813152827.1081@skipper.demon.co.uk> References: <Pine.SUN.3.91.951005003000.1000A-100000-100000-100000@lagrange.uwaterloo.ca> <4540ha$hqn@regina.seh.codem.com> <813106607.29468@skipper.demon.co.uk> <4575rs$ang@solutions.solon.com> NNTP-Posting-Host: skipper.demon.co.uk X-NNTP-Posting-Host: skipper.demon.co.uk X-Newsreader: Forte Agent .99b.112