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


Groups > comp.lang.javascript > #23949

Re: Program logic weirdness?

Newsgroups comp.lang.javascript
Date 2014-04-25 23:18 -0700
References <9642e93e-b03c-4898-a032-14ef38d3cc2e@googlegroups.com>
Message-ID <bfbecbb2-47de-4cc4-b40e-348992c5e71b@googlegroups.com> (permalink)
Subject Re: Program logic weirdness?
From jonas.thornvall@gmail.com

Show all headers | View raw


Den lördagen den 26:e april 2014 kl. 07:53:59 UTC+2 skrev jonas.t...@gmail.com:
> I find some things causing logical problems in programming.
> 
> 
> 
> I have a loop, that will print out two arrays filled with element A and B.
> 
> 
> 
> Now B have prerequisite that it will only be printout when x<3 dealing with Writing to canvas i want todo so Little operations as possible in the actual printout. And x is set Before we go into loop?
> 
> 
> 
> Of course i do not want to check for each element, because x is already set when i go into loop.
> 
> 
> 
> 
> 
> But it also seem weird that i should need to run two legs, e.g two loops one for A and one for B due to a prerequisite on B?
> 
> 
> 
> I mean let us say there was 50 variables and different prerequisites instead of two? I can hardly run each printout in its own leg?
> 
> 
> 
> This problem must have a general solution that i have learned but forgotten?
> 
> 
> 
> How is this generally solved?

Maybe this is impossible without making the A and B object properties of the loop, making the loops named objects with properties?

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


Thread

Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-25 22:53 -0700
  Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-25 22:57 -0700
    Re: Program logic weirdness? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-26 12:35 +0100
      Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-26 07:59 -0700
        Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-26 08:11 -0700
        Re: Program logic weirdness? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-26 22:34 +0100
          Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-27 00:44 -0700
            Re: Program logic weirdness? Tim Streater <timstreater@greenbee.net> - 2014-04-27 13:20 +0100
              Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-27 06:09 -0700
                Re: Program logic weirdness? Tim Streater <timstreater@greenbee.net> - 2014-04-27 18:30 +0100
                Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-27 12:13 -0700
                Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-28 02:33 -0700
              Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-27 06:25 -0700
              Re: Program logic weirdness? Denis McMahon <denismfmcmahon@gmail.com> - 2014-04-27 14:55 +0000
            Re: Program logic weirdness? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-04-27 15:41 +0100
              Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-27 13:57 -0700
  Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-25 23:18 -0700
  Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-25 23:23 -0700
  Re: Program logic weirdness? Christoph Michael Becker <cmbecker69@arcor.de> - 2014-04-26 15:06 +0200
    Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-26 08:00 -0700
    Re: Program logic weirdness? jonas.thornvall@gmail.com - 2014-04-26 08:06 -0700

csiph-web