Article View: comp.lang.misc
Article #5665Re: Query re optimising hcrs
From: Steven Ryan
Date: Sat, 30 Jul 1988 21:13
Date: Sat, 30 Jul 1988 21:13
14 lines
957 bytes
957 bytes
> Only if the order that logical expressions is calculated
>is undefined is this optimization reasonable.
That is why it is better to leave the order of evaluation undefined.
> if( (p != NULL) && (*p == VALUE) )
>
>where I check that the pointer is good and then check the value. Reorganize
>this and all hell will break loose.
C, Algol60, and Algol68 provide an alternate construct which safe, explicit,
and lets the operators be just operators:
if ( p==nil ? false : *p==value )
Technical Details
Message-ID:
<1113@garth.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-lcc!mordor!joyce!sri-unix!garth!smryanReferences:
<561@etive.ed.ac.uk> <24414@think.UUCP> <3678@hcr.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-lcc!mordor!joyce!sri-unix!garth!smryan From: smryan@garth.UUCP (Steven Ryan) Newsgroups: comp.lang.misc Subject: Re: Query re optimising hcrs Message-ID: <1113@garth.UUCP> Date: 30 Jul 88 21:13:37 GMT References: <561@etive.ed.ac.uk> <24414@think.UUCP> <3678@hcr.UUCP> Reply-To: smryan@garth.UUCP (Steven Ryan) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 13