programming_fundamentals_with_processing:ch02-getting-going.html
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
programming_fundamentals_with_processing:ch02-getting-going.html [2017/07/26 16:57] – mithat | programming_fundamentals_with_processing:ch02-getting-going.html [2017/07/26 17:44] (current) – [The console] mithat | ||
---|---|---|---|
Line 129: | Line 129: | ||
Sending text messages to the console can be accomplished with two predefined Processing functions: '' | Sending text messages to the console can be accomplished with two predefined Processing functions: '' | ||
- | **program '' | + | <file java cranberries.pde> |
- | + | ||
- | <code java> | + | |
void setup() { | void setup() { | ||
println(" | println(" | ||
} | } | ||
- | </code> | + | </file> |
The above code consists of a definition of the '' | The above code consists of a definition of the '' | ||
Line 141: | Line 140: | ||
Cranberries are high in antioxidants. | Cranberries are high in antioxidants. | ||
</ | </ | ||
+ | |||
Notice the double quotation marks around the text. These are important. They tell '' | Notice the double quotation marks around the text. These are important. They tell '' | ||
Line 157: | Line 157: | ||
} | } | ||
</ | </ | ||
+ | |||
produces the following console output: | produces the following console output: | ||
Line 162: | Line 163: | ||
Cranberries are high in antioxidants. | Cranberries are high in antioxidants. | ||
</ | </ | ||
+ | |||
Using '' | Using '' | ||
Line 172: | Line 174: | ||
} | } | ||
</ | </ | ||
- | will outputs: | + | |
+ | will output: | ||
< | < | ||
Line 180: | Line 183: | ||
antioxidants. | antioxidants. | ||
</ | </ | ||
+ | |||
=== Outputting numbers and calculations === | === Outputting numbers and calculations === | ||
Line 215: | Line 219: | ||
</ | </ | ||
- | ---- | + | <WRAP center round box 80%> |
=== Geek break: What about input? === | === Geek break: What about input? === | ||
Line 224: | Line 227: | ||
Because text-based input is as involved as it is in Processing, we will avoid it in this text. We will, however, work with some of the interaction features that Processing makes very easy when we cover //event handling//. | Because text-based input is as involved as it is in Processing, we will avoid it in this text. We will, however, work with some of the interaction features that Processing makes very easy when we cover //event handling//. | ||
+ | </ | ||
- | ---- | ||
==== The canvas ==== | ==== The canvas ==== |
programming_fundamentals_with_processing/ch02-getting-going.html.1501088233.txt.gz · Last modified: 2017/07/26 16:57 by mithat