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


Groups > comp.lang.javascript > #37374

Re: A proposition for a conditional loop.

Path csiph.com!aioe.org!.POSTED.wIgm+2MIUUYkuZKIR0Uhug.user.gioia.aioe.org!not-for-mail
From "R.Wieser" <address@not.available>
Newsgroups comp.lang.javascript
Subject Re: A proposition for a conditional loop.
Date Wed, 25 Sep 2019 09:05:14 +0200
Organization Aioe.org NNTP Server
Lines 76
Message-ID <qmf3jo$11dm$1@gioia.aioe.org> (permalink)
References <59bee1c7-4afe-445e-8f73-b3248e75040c@googlegroups.com> <qmdu75$1vo0$1@gioia.aioe.org> <58927a8f-1d2c-40fe-b198-e7ecb586d141@googlegroups.com>
NNTP-Posting-Host wIgm+2MIUUYkuZKIR0Uhug.user.gioia.aioe.org
X-Complaints-To abuse@aioe.org
X-Notice Filtered by postfilter v. 0.9.2
X-RFC2646 Format=Flowed; Original
X-Priority 3
X-Newsreader Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority Normal
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.5512
Xref csiph.com comp.lang.javascript:37374

Show key headers only | View raw


Jonas,

> I think you missed the point Rudy, did you check the picture i posted?

Noipe, I didn't.   And no, I did not check the picture either.  Phew: A Do
while and a Do until loop.  Shocking.   Not explaining anything, one way or
another. :-(

I /assumed/ that this thread was about the "for" loop.  And pardon me, but
looking at the rest of your messages (no "do until" form of the "for" loop)
it looks like I'm right.   Than again,. you did not actually say that, so
there still is a possibility I'm wrong on that.

> Because you will have to use negations until your condition is
> satisfied, and **after** loop finished do what you try to achieve.
> Thus it ends up.
>
> while (this!=that[x]){
> x++;
> }
> do_It();

I'm sorry, but the above sentence and "code" are gibberish to me.  "use
negations" ?   Like "a = -a" ?  Something else perhaps ?   And "your
condition" ?   Where ?   What condition ?  That "this!=that[x]" part ?
Whats wrong with it (other than it being non-valid ....)  ?  Though that
condition does not show any kind of "negation", so I'm not even sure you are
referring to it.  But if not, what /are/ you there referring to ?

In short: Rephrase please.   What is that condition you want to see, and
what role should that negation play in it.

And to be blunt about it: Your initial post in this thread is sorely lacking
too : It definitily does /not/ specify what you are after. Yes, a I saw that
you wanted a conditional loop.  The problem is that you included /zero/
information to what that loop should do, or how it differs from the multiple
ones we already got. :-(

Bottom line: When writing something (especially a thread-starter) /think/
about what you want to tell/ask us.  And than write it as if we, the
readers, do /not/ have any mind-reading capabilities (meaning: if you do not
say it we do not know it).   Specify /why/ you posted.

And yes, that often means you start with a centence *outlining the
problem/idea/whatever*.  Starting a thread (or even post) with "Well this or
similar" /when you have not actually said anything/ (there is no "this" yet)
does not make any sense I'm afraid.



But after having read the whole it boils down to that there is no "do until"
form of the "for" loop.  Correct ?

In that case, why didn't you just /say so/ and ask ?  Or google for it ?

for (i=5, flag=true ; i<2 || flag ; i++, flag=false) {
    // do something
}

Presto, a "for" loop which does the "do something" at least once. (notice
that, in the example, the "i=5" and "i<2" would mean that a normal "for"
loop would skip the do something")

And yes, I had to google the usage of multiple commands in the init as well
as in the increment parts of the "for" loop there.  Some languages allow it,
others don't.

> So... I am just here to complain, but my complaints do make sense.

I had to guess to what your complaint actually was, so .. no ? :-\

Regards,
Rudy Wieser


Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-23 00:55 -0700
  Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-23 01:05 -0700
    Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-23 01:14 -0700
      Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-23 01:16 -0700
        Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-24 05:12 -0700
  Re: A proposition for a conditional loop. "R.Wieser" <address@not.available> - 2019-09-24 22:27 +0200
    Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-24 22:39 -0700
      Re: A proposition for a conditional loop. "R.Wieser" <address@not.available> - 2019-09-25 09:05 +0200
        Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-25 02:47 -0700
          Re: A proposition for a conditional loop. "R.Wieser" <address@not.available> - 2019-09-25 13:13 +0200
            Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-25 05:13 -0700
              Re: A proposition for a conditional loop. "R.Wieser" <address@not.available> - 2019-09-25 15:04 +0200
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-25 06:10 -0700
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-25 15:50 +0100
                Re: A proposition for a conditional loop. Tim Streater <timstreater@greenbee.net> - 2019-09-25 16:00 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-25 10:20 -0700
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-25 10:26 -0700
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-25 19:18 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-25 12:19 -0700
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-26 10:48 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-26 04:38 -0700
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-26 18:05 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-26 10:54 -0700
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-27 10:06 +0100
                Re: A proposition for a conditional loop. dr.j.r.stockton@gmail.com - 2019-09-27 02:34 -0700
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-27 05:32 -0700
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-27 05:36 -0700
                Re: A proposition for a conditional loop. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-09-27 20:23 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-27 12:45 -0700
                Re: A proposition for a conditional loop. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-09-27 22:05 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-27 14:39 -0700
                Re: A proposition for a conditional loop. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2019-09-28 00:16 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-27 17:10 -0700
                Re: A proposition for a conditional loop. "R.Wieser" <address@not.available> - 2019-09-28 17:28 +0200
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-28 11:34 -0700
                Re: A proposition for a conditional loop. "R.Wieser" <address@not.available> - 2019-09-28 22:23 +0200
                Re: A proposition for a conditional loop. Tim Streater <timstreater@greenbee.net> - 2019-09-28 21:42 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-29 07:40 -0700
                Re: A proposition for a conditional loop. "R.Wieser" <address@not.available> - 2019-09-29 18:33 +0200
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-29 09:58 -0700
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-29 19:18 +0100
                Re: A proposition for a conditional loop. "R.Wieser" <address@not.available> - 2019-09-29 21:02 +0200
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-29 13:54 -0700
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-28 10:41 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-27 13:17 -0700
                Re: A proposition for a conditional loop. Tim Streater <timstreater@greenbee.net> - 2019-09-27 13:41 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-27 06:01 -0700
                Re: A proposition for a conditional loop. Tim Streater <timstreater@greenbee.net> - 2019-09-27 14:03 +0100
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-27 19:23 +0100
                Re: A proposition for a conditional loop. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-27 12:06 -0700
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-28 14:43 +0100
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-25 21:47 +0100
                Re: A proposition for a conditional loop. John G Harris <niam@jghnorth.org.uk.invalid> - 2019-09-26 10:49 +0100
                Re: A proposition for a conditional loop. "R.Wieser" <address@not.available> - 2019-09-25 17:07 +0200

csiph-web