Re: while(T[l]<p & l<=r)

Liste des GroupesRevenir à l c 
Sujet : Re: while(T[l]<p & l<=r)
De : phaywood (at) *nospam* alphalink.com.au (Peter 'Shaggy' Haywood)
Groupes : comp.lang.c
Date : 03. Apr 2024, 01:25:55
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <3pgudk-e4a.ln1@hendrix.foo>
References : 1
User-Agent : KNode/0.10.9
Groovy hepcat fir was jivin' in comp.lang.c on Wed, 27 Mar 2024 10:35
pm. It's a cool scene! Dig it.

tell me, is while(T[l]<p & l<=r) the same as while((T[l]<p)&&(l<=r))
i was unable ro remember that

  You're forgetting that && is a so-called "short circuit" operator. If
the left operand is false, then the right operand is not evaluated.
This makes little difference in this particular case; but what if you
had something like this instead?

while(some_function() < p && some_other_function() <= r)

Here some_other_function() will not be called if the some_function()
call returns a value >= p.

--


----- Dig the NEW and IMPROVED news sig!! -----


-------------- Shaggy was here! ---------------
              Ain't I'm a dawg!!

Date Sujet#  Auteur
27 Mar 24 * while(T[l]<p & l<=r)18fir
28 Mar 24 +* Re: while(T[l]<p & l<=r)15Janis Papanagnou
28 Mar 24 i+* Re: while(T[l]<p & l<=r)7fir
28 Mar 24 ii`* Re: while(T[l]<p & l<=r)6Janis Papanagnou
28 Mar 24 ii `* Re: while(T[l]<p & l<=r)5fir
28 Mar 24 ii  `* Re: while(T[l]<p & l<=r)4bart
28 Mar 24 ii   `* Re: while(T[l]<p & l<=r)3fir
28 Mar 24 ii    `* Re: while(T[l]<p & l<=r)2bart
29 Mar 24 ii     `- Re: while(T[l]<p & l<=r)1fir
28 Mar 24 i+* Re: while(T[l]<p & l<=r)2David Brown
28 Mar 24 ii`- Re: while(T[l]<p & l<=r)1Kaz Kylheku
30 Mar 24 i+* Re: while(T[l]<p & l<=r)3Tim Rentsch
30 Mar 24 ii`* Re: while(T[l]<p & l<=r)2fir
9 Apr 24 ii `- Re: while(T[l]<p & l<=r)1Tim Rentsch
31 Mar 24 i+- Re: while(T[l]<p & l<=r)1fir
14 Apr 24 i`- Re: while(T[l]<p & l<=r)1Phil Carmody
3 Apr 24 `* Re: while(T[l]<p & l<=r)2Peter 'Shaggy' Haywood
3 Apr 24  `- Re: while(T[l]<p & l<=r)1fir

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal