[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a
From: |
alex xmb ratchev |
Subject: |
Fwd: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- ") |
Date: |
Thu, 23 Mar 2023 12:03:47 +0100 |
---------- Forwarded message ---------
From: alex xmb ratchev <fxmbsw7@gmail.com>
Date: Thu, Mar 23, 2023, 12:03
Subject: Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash:
((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable
(error token is "-= 2 || a-- ")
To: Reuti <reuti@staff.uni-marburg.de>
On Thu, Mar 23, 2023, 11:49 Reuti <reuti@staff.uni-marburg.de> wrote:
>
> > Am 23.03.2023 um 11:35 schrieb alex xmb ratchev <fxmbsw7@gmail.com>:
> >
> > or one small deeper parsing bug
> >
> > ~ $ (( a = 8 , a > 4 && a -= 2 ))
> > bash: ((: a = 8 , a > 4 && a -= 2 : attempted assignment to non-variable
> > (error token is "-= 2 ")
>
> This could be written as:
>
> (( a = 8 , a= a > 4 ? a-2 : a ))
>
oic yes ill code that so thxx
The && is already used for logical AND like:
>
oic2 i dunno those
((a= c==8 && d==9 ))
>
> -- Reuti
>
thanks mate , /xmb
>
> > i can only agree to enable such basic functionment
> >
> > greets ..
> >
> > On Thu, Mar 23, 2023, 11:32 alex xmb ratchev <fxmbsw7@gmail.com> wrote:
> >
> >> i remember doing && (( code
> >> maybe i didnt '=' in action there
> >>
> >> (( a = 8 , a > 4 && a -= 2 || a-- ))
> >>
> >> bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to
> >> non-variable (error token is "-= 2 || a-- ")
> >>
> >>
> >> (( a = 8 , a > 4 && a-- && a-- || a-- ))
> >>
> >> works
> >> a=6
> >>
> >> ..
> >> i suppose this is a (( lex bug where u didnt include || && in op for =
> >>
> >> is it ? :))
> >>
> >> greets
> >>
>
>
Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- "), Kerin Millar, 2023/03/23
- Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- "), alex xmb ratchev, 2023/03/23
- Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- "), alex xmb ratchev, 2023/03/23
- Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- "), alex xmb ratchev, 2023/03/23
- Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- "), Greg Wooledge, 2023/03/23
- Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- "), alex xmb ratchev, 2023/03/23
Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- "), Kerin Millar, 2023/03/23
Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- "), alex xmb ratchev, 2023/03/23
Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- "), alex xmb ratchev, 2023/03/23
- Prev by Date:
Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- ")
- Next by Date:
Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- ")
- Previous by thread:
Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- ")
- Next by thread:
Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- ")
- Index(es):