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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.