Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » How is Scratch code executed?
        ![[RSS Feed] [RSS Feed]](//cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)  
- Hopeijay
- 
                             Scratcher Scratcher
90 posts
How is Scratch code executed?
Hi again.
I'm going to teach teachers to code in Scratch and I want to be properly prepared. I have a month on me, so it's ok if there is a lot to read.
I'm wondering how Scratch executes code when there are several unconnected piles/groups of code in the editor. I often see this with children, but also new beginner adults code like that.
I got some links from our Norwegian group of Teach Kids To Code, but I'm currious if there's more.
Thanks in advance.
I am not completely sure but I believe it executes a little like JavaScript in that it is an interpreted language. This would mean it reads blocks of a script from top to bottom, line by line.
P.S. I think it is amazing that you are teaching your teachers to code, good luck!
- SabiB
- 
                             Scratcher Scratcher
94 posts
How is Scratch code executed?
Event blocks execute in the order of which they were placed if they are intended to run on the same tick.
This means that if you place 2
                        
                        
                    This means that if you place 2
when green flag clickedblocks, then no matter what is attached to them, the first one that you placed will execute before the second.
- Discussion Forums
- » Advanced Topics
- 
            » How is Scratch code executed? ![[RSS Feed] [RSS Feed]](//cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)  
![[RSS Feed] [RSS Feed]](http://cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)

