Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #384134

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

From fir <fir@grunge.pl>
Newsgroups comp.lang.c
Subject Re: while(T[l]<p & l<=r)
Date 2024-03-31 17:10 +0200
Organization i2pn2 (i2pn.org)
Message-ID <uubudh$3ktle$1@i2pn2.org> (permalink)
References <uu109u$3798b$1@i2pn2.org> <uu3kqb$3i23g$1@dont-email.me> <kXeNN.99578$24ld.63941@fx07.iad>

Show all headers | View raw


Scott Lurndal wrote:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>> On 27.03.2024 12:35, fir wrote:
>>> tell me, is while(T[l]<p & l<=r) the same as while((T[l]<p)&&(l<=r))
>>
>> 1. As long as K&R precedences still hold you don't need the inner
>> parentheses; '<' and '<=' has higher precedence than '&' and '&&'.
>
> While true, the parenthesis can be helpful to the reader
> and have no adverse effects.
>

i think i will use the rule if the operator precedences are right

(and here ARITHM < REL < LOG rule is ruight) i will not use parenthesis 
but when its wrong  i will use them (probably even if they are not needed)

if(!(i%16)) for example i must use it becouse if(!i%16) sadly and
unproperly dont work




Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

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