8 The Building Blocks of Code

Variables, Operators, Statements, and Functions

Classes and Object Oriented Programming techniques are important, powerful, helpful, modern, etc. But the essential building blocks of code haven't changed since the dawn of computing — when vacuum tubes were new.

To make any kind of program work, several things are required:

  • Memory to store data: Variables.
  • The ability to manipulate data: Operators.
  • Control over the order of operation: Statements.
  • A way to make code modular: Functions.

It may be helpful to know that all computer languages are the same — essentially. The most powerful chips (CPUs) in use today all do pretty much the same things. And today's chips are pretty much the same as yesterdays. They are just ...

Get Understanding Macromedia Flash 8 ActionScript 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.