Code flow: Difference between revisions
Line 16: | Line 16: | ||
<source lang="bf"> ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.</source> | <source lang="bf"> ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.</source> | ||
[[wikipedia:Brainfuck|+]] | |||
http://www.retas.de/thomas/computer/programs/useless/piet/hw1-11.gif | http://www.retas.de/thomas/computer/programs/useless/piet/hw1-11.gif |
Revision as of 15:12, 25 September 2012
<slidy theme="aa" />
A Computer Glossary
Husband & wife design superstars Charles & Ray Eames produced this animation explaining the "mood" and jargon of computation for the IBM pavilion at the 1968 Worlds Fair in San Antonio Texas.
Hello World
http://rosettacode.org/wiki/Hello_world/Newbie
print "Hello world!"
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
http://www.retas.de/thomas/computer/programs/useless/piet/explain.html
Expression / Evaluation
Some expressions for the console...
5
3
"Tristram"
'SHAndy'
Operations
5 * 3
100 - 1
3 * 8
"Tristram" + "Shandy"
Operations: Functions
Math.sqrt (25)
Math.sqrt (26)
Objects
"Tristram".toUpperCase
?!
"Tristram".toUpperCase()
Assignment
Assignment is the process of storing an expression in a "name", called a variable.
x = 5 * 3
name = "Tristram"
Assignment ++
x = x + 1
x += 1
x++
name = name + " Shandy"
DOM
c=document.getElementById("c")
Reaching into the document and grabbing hold of the page.
Canvas
See Canvas
The canvas tag was introduced by Apple and has been standardized to become part of HTML5.
Using a function to control when things happen in the page
Loop
Handouts
Assignment, GeneralImperative + ProgramHighLow