Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32435
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Logic problem, i always had problem translate until statements into while |
| Date | 2017-02-01 16:56 +0000 |
| Message-ID | <010220171656550806%timstreater@greenbee.net> (permalink) |
| References | (11 earlier) <1612792.atdPhlSkOF@PointedEars.de> <cbf2e308-f5d6-4adf-a4a3-49249ff239f5@googlegroups.com> <b5537f24-a5ed-4801-b2e3-38e2e09d8bc2@googlegroups.com> <1dbcb59b-d06e-4519-a9da-e84aa9826a40@googlegroups.com> <62ef7ba0-faf5-4fe1-a65f-ba1c8f200637@googlegroups.com> |
In article <62ef7ba0-faf5-4fe1-a65f-ba1c8f200637@googlegroups.com>,
<jonas.thornvall@gmail.com> wrote:
>What is your view about this solution?
>
>funaction a(){
>param1= document.getElementById('regular').checked;
>param2= document.getElementById('connected').checked)
>generate_graph(param1,param2);
>}
>
>function generate_graph(){
>var found=false;
>do until (found==true && timeB < stoptime)
> {
> arr = makeNodes();
> regular = createLinks(arr);
> if (regular==true) printnode = untangle_links(arr);
> if (connected == param2 && regular == param1) {found=true;}
> return found;
> }
>}
You don't need found at all, or the loop. This does the same:
function generate_graph(){
arr = makeNodes();
regular = createLinks(arr);
if (regular==true) printnode = untangle_links(arr);
}
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-26 10:39 -0800
Re: Logic problem, i always had problem translate until statements into while Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-26 20:28 +0000
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-26 13:24 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-26 13:33 -0800
Re: Logic problem, i always had problem translate until statements into while Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-26 23:06 +0000
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 01:33 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 01:57 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 02:17 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 02:35 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 02:39 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 02:43 -0800
Re: Logic problem, i always had problem translate until statements into while Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-27 11:23 +0000
Re: Logic problem, i always had problem translate until statements into while Tim Streater <timstreater@greenbee.net> - 2017-01-27 12:14 +0000
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 08:00 -0800
Re: Logic problem, i always had problem translate until statements into while Gene Wirchenko <genew@telus.net> - 2017-01-27 09:29 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 10:43 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 10:44 -0800
Re: Logic problem, i always had problem translate until statements into while Gene Wirchenko <genew@telus.net> - 2017-01-27 15:46 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 18:20 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 18:34 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 18:51 -0800
Re: Logic problem, i always had problem translate until statements into while John Harris <niam@jghnorth.org.uk.invalid> - 2017-01-28 10:07 +0000
Re: Logic problem, i always had problem translate until statements into while Gene Wirchenko <genew@telus.net> - 2017-01-30 09:14 -0800
Re: Logic problem, i always had problem translate until statements into while "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-28 10:48 +0100
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-28 05:05 -0800
Re: Logic problem, i always had problem translate until statements into while "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-27 13:43 +0100
Re: Logic problem, i always had problem translate until statements into while Scott Sauyet <scott.sauyet@gmail.com> - 2017-01-27 19:52 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 22:25 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 22:36 -0800
Re: Logic problem, i always had problem translate until statements into while Scott Sauyet <scott.sauyet@gmail.com> - 2017-01-29 18:05 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-30 09:25 -0800
Re: Logic problem, i always had problem translate until statements into while Dr J R Stockton <reply1700@merlyn.demon.co.uk.invalid> - 2017-01-31 23:12 +0000
Re: Logic problem, i always had problem translate until statements into while "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-01 09:22 +0100
Re: Logic problem, i always had problem translate until statements into while Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-27 11:02 +0000
Re: Logic problem, i always had problem translate until statements into while Tim Streater <timstreater@greenbee.net> - 2017-01-27 12:11 +0000
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 07:53 -0800
Re: Logic problem, i always had problem translate until statements into while "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-27 17:07 +0100
Re: Logic problem, i always had problem translate until statements into while Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-28 00:55 +0000
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 18:14 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-27 18:15 -0800
Re: Logic problem, i always had problem translate until statements into while Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-28 15:22 +0000
Re: Logic problem, i always had problem translate until statements into while Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-01-28 16:54 +0100
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-28 13:53 -0800
Re: Logic problem, i always had problem translate until statements into while Tim Streater <timstreater@greenbee.net> - 2017-01-28 22:13 +0000
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-29 01:27 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-01-29 09:41 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-02-01 08:51 -0800
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-02-01 09:03 -0800
Re: Logic problem, i always had problem translate until statements into while "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-01 19:19 +0100
Re: Logic problem, i always had problem translate until statements into while Tim Streater <timstreater@greenbee.net> - 2017-02-01 18:35 +0000
Re: Logic problem, i always had problem translate until statements into while "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-01 19:40 +0100
Re: Logic problem, i always had problem translate until statements into while Tim Streater <timstreater@greenbee.net> - 2017-02-01 19:06 +0000
Re: Logic problem, i always had problem translate until statements into while Tim Streater <timstreater@greenbee.net> - 2017-02-01 19:09 +0000
Re: Logic problem, i always had problem translate until statements into while jonas.thornvall@gmail.com - 2017-02-01 08:51 -0800
Re: Logic problem, i always had problem translate until statements into while Tim Streater <timstreater@greenbee.net> - 2017-02-01 16:56 +0000
Re: Logic problem, i always had problem translate until statements into while "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-27 13:36 +0100
csiph-web