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


Groups > comp.lang.javascript > #32598

Re: Optional code to execute in loop?

Newsgroups comp.lang.javascript
Date 2017-02-10 09:55 -0800
References <200390cb-0ecc-4e01-979c-c1ad09506073@googlegroups.com>
Message-ID <bedeca21-d828-472d-9f0a-db538fd653cb@googlegroups.com> (permalink)
Subject Re: Optional code to execute in loop?
From jonas.thornvall@gmail.com

Show all headers | View raw


Den fredag 10 februari 2017 kl. 18:49:50 UTC+1 skrev jonas.t...@gmail.com:
> I draw out graphic and sometime i want optional data upon the lineart, but not always, redraw does  call the animation every x millisec, i really  do not want multiple loops because that effect the performance?
> 
> So can you have if statement within a loop that is not checked again and again but just once?
> 
> Yeah i know it sounds ridiculous, it sounds like a different programming paradigm.
> 
> But people must be dealing with this kind of issues when writing out big sets of data that sometimes they want the exra info/data and somtimes omitted.

Actually it would be 3 versions and so on for every optional data you want, and their combinations, i think it is weird programming languages do not have built in functionality to handle cases?

Or is there a way to omit different set of information in javascripts loops?

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


Thread

Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 09:49 -0800
  Re: Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 09:53 -0800
  Re: Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 09:55 -0800
    Re: Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 10:19 -0800
      Re: Optional code to execute in loop? Gene Wirchenko <genew@telus.net> - 2017-02-10 13:54 -0800
        Re: Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 19:46 -0800
          Re: Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 19:56 -0800
            Re: Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 20:11 -0800
              Re: Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 20:24 -0800
                Re: Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 20:49 -0800
                Re: Optional code to execute in loop? jonas.thornvall@gmail.com - 2017-02-10 21:38 -0800

csiph-web