Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #33105
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2017-04-24 05:44 -0700 |
| References | (8 earlier) <72f890c2-011a-4732-91ab-defcaaf350ce@googlegroups.com> <uijrfcd0kgrocvbs5ulcpp62cu7plu34r8@4ax.com> <3b15914a-0362-4ba7-9055-4ebf4bea9220@googlegroups.com> <0af59f6f-8ad6-4d68-af0c-ad3685e828c3@googlegroups.com> <fae573bc-f7ed-40cb-9d80-a1c65cea881b@googlegroups.com> |
| Message-ID | <16399cc8-7abd-4eec-99a6-e5f53a3b8dbd@googlegroups.com> (permalink) |
| Subject | Re: Javascripts and highlevel computer language programming of graphics |
| From | jonas.thornvall@gmail.com |
Den måndag 24 april 2017 kl. 14:37:01 UTC+2 skrev jonas.t...@gmail.com: > Den måndag 24 april 2017 kl. 14:32:50 UTC+2 skrev jonas.t...@gmail.com: > > Den måndag 24 april 2017 kl. 14:26:09 UTC+2 skrev jonas.t...@gmail.com: > > > Den måndag 24 april 2017 kl. 12:09:10 UTC+2 skrev John G Harris: > > > > On Sun, 23 Apr 2017 09:57:55 -0700 (PDT), jonas.thornvall@gmail.com > > > > wrote: > > > > > > > > >Den söndag 23 april 2017 kl. 18:47:14 UTC+2 skrev jonas.t...@gmail.com: > > > > <snip> > > > > > > > > >> I think i can wrap my head around it, so the alert could be the redraw > > > > >> and the functions could be the array objects,arrayelements that is called, > > > > >> it is a smart approach i like it. Is this a javascript only feature or > > > > >>is similar approach allowed in C++ and JAVA? > > > > > > > > C++ : Yes, Java : Sort of. > > > > > > > > > > > > >> Would it seem correct to build up an array with the functions you want > > > > >> called, so i use the user inputs "and my knowledge of draworder", to build > > > > >> up the array and the functions to be called/stepped thru "for my purpose"? > > > > >> Have i understood it correct? > > > > <snip> > > > > > > > > You can build the array and use it any way you like, just like any > > > > other array. > > > > > > > > > > > > >Actually it is just what i wanted i just was not aware it was a part of > > > > >javascript, the array elements are functions that can be called fantastic i > > > > >think. When was this introduced into Javascript, i like functions as parameters > > > > >to other functions "sort of". > > > > > > > > Functions in ECMAScript have always been Function Objects. They can be > > > > put anywhere an object can be put. The difference from other kinds of > > > > object is that if b contains a Function Object you can call the > > > > function by doing b() [with whatever is needed inside the brackets of > > > > course]. > > > > > > > > John > > > > > > Is there any disadvantages in speed doing the function calls this way, because obviously being within redraw there will be alot of them? > > > > > > If the calls turn out to be slower then actually doing the checks, there will be no point, but my guess is these calls do not differ in speed compared to an ordinary function call? > > > > > > And you have to add up the counter in the loop for every drawing element, how does that compare to doing a boolean check? > > > > > > if (argument==true) doThis(); > > > else if ..... > > > else if ..... > > > else if ..... > > > > > > vs > > > > > > for (m=0;m<arguments.length;m++) fd[m](); > > > > > > "I realise you need some structure to hold an arbitrary number of calls so why not an array, #it is a bit harder for me to understand why a counter needed, but maybe my case isn't the typical? > > > > > > I was a bit dreaming of it as a "heap" of calls constructed? But that does not seem to be the case? > > > > > > MYHEAP="X(),Y(),Z()"; > > > > > > CALL(MYHEAP) > > > > > > EQUALS > > > > > > DO X(),DO Y(),DO Z() > > > > > > But maybe the above is equivalent to stepping thru an array of function arguments? > > > > Well maybe i am a bit confused here, i am not that lowlevel knowledgable, maybe i mean a stack here rather than a heap, a set of pointers to the memory adresses of the functions? > > I looked around and i probably meant a sequential stack of instruction calls to memory adresses, it is faster then the use of heap isn't it? MYSTACK="X(),Y(),Z()"; CALL(MYSTACK) EQUALS DO X(),DO Y(),DO Z()
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-14 11:49 -0700
Re: Javascripts and highlevel computer language programming of graphics John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-15 11:07 +0100
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-15 11:52 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-15 12:04 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-15 14:52 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-15 15:04 -0700
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-16 00:09 +0200
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-15 15:18 -0700
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-16 11:27 +0200
Re: Javascripts and highlevel computer language programming of graphics <cyber@2trom.com> - 2017-04-16 15:08 +0000
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-16 20:47 +0200
Re: Javascripts and highlevel computer language programming of graphics Gene Wirchenko <genew@telus.net> - 2017-04-17 10:02 -0700
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-17 23:46 +0200
Re: Javascripts and highlevel computer language programming of graphics Gene Wirchenko <genew@telus.net> - 2017-04-18 17:39 -0700
Re: Javascripts and highlevel computer language programming of graphics Andrew Poulos <ap_prog@hotmail.com> - 2017-04-19 11:25 +1000
Re: Javascripts and highlevel computer language programming of graphics Bob Martin <bob.martin@excite.com> - 2017-04-19 07:30 +0100
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-19 12:13 +0200
Re: Javascripts and highlevel computer language programming of graphics Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-04-19 13:58 +0200
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-19 17:20 +0200
Re: Javascripts and highlevel computer language programming of graphics Gene Wirchenko <genew@telus.net> - 2017-04-19 10:00 -0700
Re: Javascripts and highlevel computer language programming of graphics <cyber@2trom.com> - 2017-04-20 12:33 +0000
Re: Javascripts and highlevel computer language programming of graphics Gene Wirchenko <genew@telus.net> - 2017-04-20 11:39 -0700
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-20 21:24 +0200
Re: Javascripts and highlevel computer language programming of graphics Gene Wirchenko <genew@telus.net> - 2017-04-21 11:57 -0700
Re: Javascripts and highlevel computer language programming of graphics Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-04-21 18:37 +0200
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-19 12:00 +0200
Re: Javascripts and highlevel computer language programming of graphics Gene Wirchenko <genew@telus.net> - 2017-04-19 10:03 -0700
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-20 00:07 +0200
Re: Javascripts and highlevel computer language programming of graphics Gene Wirchenko <genew@telus.net> - 2017-04-19 17:21 -0700
Re: Javascripts and highlevel computer language programming of graphics Andrew Poulos <ap_prog@hotmail.com> - 2017-04-20 15:54 +1000
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-20 08:46 +0200
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-20 08:43 +0200
Re: Javascripts and highlevel computer language programming of graphics Gene Wirchenko <genew@telus.net> - 2017-04-20 11:42 -0700
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-20 21:37 +0200
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-21 03:23 -0700
Re: Javascripts and highlevel computer language programming of graphics Andrew Poulos <ap_prog@hotmail.com> - 2017-04-22 16:21 +1000
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-22 12:15 +0200
Re: Javascripts and highlevel computer language programming of graphics Gene Wirchenko <genew@telus.net> - 2017-04-21 11:58 -0700
Re: Javascripts and highlevel computer language programming of graphics <cyber@2trom.com> - 2017-04-17 13:01 +0000
Re: Javascripts and highlevel computer language programming of graphics Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-04-17 20:28 +0200
Re: Javascripts and highlevel computer language programming of graphics bit-naughty@hotmail.com - 2017-04-19 23:50 -0700
Re: Javascripts and highlevel computer language programming of graphics Andrew Poulos <ap_prog@hotmail.com> - 2017-04-20 19:02 +1000
Re: Javascripts and highlevel computer language programming of graphics "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-04-20 11:24 +0200
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-15 15:14 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-15 15:24 -0700
Re: Javascripts and highlevel computer language programming of graphics John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-17 10:49 +0100
Re: Javascripts and highlevel computer language programming of graphics RobG <rgqld@iinet.net.au> - 2017-04-23 08:39 +1000
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-22 15:46 -0700
Re: Javascripts and highlevel computer language programming of graphics John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-23 15:29 +0100
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-23 09:47 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-23 09:57 -0700
Re: Javascripts and highlevel computer language programming of graphics John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-24 11:09 +0100
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 05:26 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 05:32 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 05:36 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 05:44 -0700
Re: Javascripts and highlevel computer language programming of graphics John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-24 15:12 +0100
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 10:12 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-23 09:49 -0700
Re: Javascripts and highlevel computer language programming of graphics John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-24 11:10 +0100
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 12:07 -0700
Re: Javascripts and highlevel computer language programming of graphics Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-04-24 21:24 +0100
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 13:32 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 13:41 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 13:56 -0700
Re: Javascripts and highlevel computer language programming of graphics John G Harris <niam@jghnorth.org.uk.invalid> - 2017-04-25 10:41 +0100
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-26 12:15 -0700
Re: Javascripts and highlevel computer language programming of graphics jonas.thornvall@gmail.com - 2017-04-24 13:27 -0700
csiph-web