Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #384150
| From | Peter 'Shaggy' Haywood <phaywood@alphalink.com.au> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: while(T[l]<p & l<=r) |
| Date | 2024-04-03 10:25 +1100 |
| Organization | A noiseless patient Spider |
| Message-ID | <3pgudk-e4a.ln1@hendrix.foo> (permalink) |
| References | <uu109u$3798b$1@i2pn2.org> |
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!!
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
while(T[l]<p & l<=r) fir <fir@grunge.pl> - 2024-03-27 12:35 +0100
Re: while(T[l]<p & l<=r) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-03-28 12:37 +0100
Re: while(T[l]<p & l<=r) fir <fir@grunge.pl> - 2024-03-28 13:18 +0100
Re: while(T[l]<p & l<=r) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-03-28 16:26 +0100
Re: while(T[l]<p & l<=r) fir <fir@grunge.pl> - 2024-03-28 17:28 +0100
Re: while(T[l]<p & l<=r) bart <bc@freeuk.com> - 2024-03-28 16:43 +0000
Re: while(T[l]<p & l<=r) fir <fir@grunge.pl> - 2024-03-28 18:12 +0100
Re: while(T[l]<p & l<=r) bart <bc@freeuk.com> - 2024-03-28 19:36 +0000
Re: while(T[l]<p & l<=r) fir <fir@grunge.pl> - 2024-03-28 23:13 +0100
Re: while(T[l]<p & l<=r) scott@slp53.sl.home (Scott Lurndal) - 2024-03-28 14:14 +0000
Re: while(T[l]<p & l<=r) David Brown <david.brown@hesbynett.no> - 2024-03-28 19:12 +0100
Re: while(T[l]<p & l<=r) Kaz Kylheku <433-929-6894@kylheku.com> - 2024-03-28 18:24 +0000
Re: while(T[l]<p & l<=r) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-03-30 10:39 -0700
Re: while(T[l]<p & l<=r) fir <fir@grunge.pl> - 2024-03-30 20:30 +0100
Re: while(T[l]<p & l<=r) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-04-08 21:55 -0700
Re: while(T[l]<p & l<=r) fir <fir@grunge.pl> - 2024-03-31 17:10 +0200
Re: while(T[l]<p & l<=r) Phil Carmody <pc+usenet@asdf.org> - 2024-04-14 23:32 +0300
Re: while(T[l]<p & l<=r) Peter 'Shaggy' Haywood <phaywood@alphalink.com.au> - 2024-04-03 10:25 +1100
Re: while(T[l]<p & l<=r) fir <fir@grunge.pl> - 2024-04-03 16:35 +0200
csiph-web