[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a
From: |
alex xmb ratchev |
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-- ") |
Date: |
Thu, 23 Mar 2023 21:00:46 +0100 |
On Thu, Mar 23, 2023, 19:53 Bipul kumar <bipul.opensource@gmail.com> wrote:
> Are you saying to me?
> I'm using simple gmail.
>
for gmail , before pasting , hold long for menu , then format , then the
one with the slash in the middle ( format off )
*> *$ (( a = 2 , a > 1 && (a -= 2) || a-- )); declare -p adeclare --
> a="-1"**
>
> It was not my statement or question.
>
> I have just answer the question being asked why
> (( a = 2 , a > 1 && (a -= 2) || a-- )); gives the value of a = -1
> And it was simple because the logical expression at `a > 1 && (a -= 2)`
> was failed here so the OR || part has increase 0 -1 = -1
>
this is , no actual of me , code
its extra bad case code that didnt cover real usage of i the question asker
thanks though
what about the later version s
i switched from wrong && to 1 ? 2 : 3
thanks , greets
Thank you
>
> Respectfully,
> Bipul
> PUBLIC KEY <http://ix.io/1nWf>
> 97F0 2E08 7DE7 D538 BDFA B708 86D8 BE27 8196 D466
> ** Please excuse brevity and typos. **
>
>
> On Fri, Mar 24, 2023 at 12:00 AM Greg Wooledge <greg@wooledge.org> wrote:
>
> > On Thu, Mar 23, 2023 at 11:48:03PM +0530, Bipul kumar wrote:
> > > *$ (( a = 2 , a > 1 && (a -= 2) || a-- )); declare -p adeclare --
> a="-1"*
> >
> > I don't know what kind of email software you're using, but this mangling
> > really makes it hard to read.
> >
> > As near as I can tell, the quoted part of your message was intended
> > to appear as two lines of text. But for whatever reason, your email
> > program has chosen to remove the newline characters, place an asterisk
> > at the beginning, place another asterisk at the end, and then place a
> > newline character at the end (after the second added asterisk).
> >
> > The result is a single long line of text, where the reader will have to
> > ignore the decorative asterisks, and guess where the newlines should go.
> >
> > The truly baffling thing, though, is that your email software did *not*
> > send an HTML part and a text part. I could understand it a litle more
> > easily if you had originally written the message in HTML format, and then
> > your email software did an automatic (and poor quality) conversion to
> > text, and attached both formats. I've seen that many times.
> >
> > But that's not what you're sending out. Your email only contained one
> > text part. No second part. So, there isn't even a "less mangled" form
> > of the content to use as a reference.
> >
> >
>
- 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-- "), (continued)
- 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
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-- "), Bipul kumar, 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-- "), Bipul kumar, 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 <=
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-- "), 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-- "), Bipul kumar, 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-- "), Bipul kumar, 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
- 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-- "), Bipul kumar, 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
- 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):