User Tools

Site Tools


ch02-getting-going.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
ch02-getting-going.html [2017/08/19 23:27]
mithat [Program statements]
ch02-getting-going.html [2017/08/20 18:15]
mithat [Entry points]
Line 21: Line 21:
 </​file>​ </​file>​
  
-This is an example of a program written in what Processing calls its Basic Mode. In Basic Mode, the program'​s execution will begin at the first statement in the source code file. It will then continue statement-by-statement until it reaches the end of the file.+This is an example of a program written in what Processing calls its //Basic Mode//. In Basic Mode, the program'​s execution will begin at the first statement in the source code file. It will then continue statement-by-statement until it reaches the end of the file.
  
 Here's a program with two statements: Here's a program with two statements:
Line 34: Line 34:
 === Processing with an entry point === === Processing with an entry point ===
  
-Processing will automatically switch to Continuous Mode when you define at least one function in your program. (This is why you are not allowed to define functions in Basic Mode.) In Continuous Mode, Processing will look for a definition of a function called **''​%%setup%%''​**,​ and it will use this function as the point where the programs ​execution begins. Below is the Continuous Mode equivalent of the Basic Mode example above.+Processing will automatically switch to //Continuous Mode// when you define at least one function in your program. (This is why you are not allowed to define functions in Basic Mode.) In Continuous Mode, Processing will look for a definition of a function called **''​%%setup%%''​**,​ and it will use this function as the point where the program'​s ​execution begins. Below is the Continuous Mode equivalent of the Basic Mode example above.
  
 <file java cranberries_continuous_mode.pde>​ <file java cranberries_continuous_mode.pde>​
ch02-getting-going.html.txt · Last modified: 2017/08/20 18:35 by mithat