Beginning Programming All-In-One For Dummies Cheat Sheet - dummies
Cheat Sheet

Beginning Programming All-In-One For Dummies Cheat Sheet

From Beginning Programming All-In-One Desk Reference For Dummies

By Wallace Wang

If you’re just getting started writing computer programs, you need to learn programming branching and looping statements to perform the specific jobs you need for an effective program. Keeping a list of computer programming resources for useful information handy can help, too.

Computer Programming Branching Statements

Most programming languages can make decisions based on the data you provide. Instead of performing the same tasks the same number of times, branching statements create a program that reads your data and automatically performs the tasks you need, skipping the tasks you don’t need. Here are some branching commands that you’ll need to know:

If (condition) Then command

If (condition) Then Commands End if
If (condition) Then Commands Else Commands End if
If (condition) Then Commands Elseif (condition2) then Commands End if
Select Case variable Case value1 Commands Case value2 Commands Else Commands End select
switch (variable) { case value1: Commands; break; case value2: Commands; break; default: commands; }

Computer Programming Looping Statements

Programs can automatically repeat subroutines and subprograms based on these looping statements. They can repeat a number of times, count a set of items and repeat for each item, or repeat as long as an attribute is true or false.

For variable = startvalue to endvalue

for (initial variable value, final value, increment) { commands; }
while (condition) { commands; }
do { commands; } while (condition);

Programming Compilers and Interpreters

Programming requires special tools to convert your written program to the technical language that your computer understands. Depending on the programming language, you need either a compiler or an interpreter to operate the computer. These Web sites have the tools for common languages.

Visual Basic, Visual C#, Visual C++, Visual Web Developer tools ( (Windows only)

Turbo Delphi, Turbo C++, Turbo C# compilers ( (Windows only)

REALbasic ( (Windows, Mac OS X, Linux)

Runtime Revolution ( (Windows, Mac OS X, Linux)

Ruby ( (Windows, Mac OS X, Linux)

Java (, (Windows, Mac OS X, Linux)

Python ( (Windows, Mac OS X, Linux)

Perl ( (Windows, Mac OS X, Linux)

PHP ( (Windows, Mac OS X, Linux)

GNU Compiler Collection ( (Windows, Mac OS X, Linux)

Dev-C++ and Dev-Pascal ( (Windows only)

Free Pascal ( (Windows, Mac OS X, Linux)

NSBasic ( (Windows, Palm, Symbian OS)

SWI-Prolog ( (Windows, Mac OS X, Linux)

CLISP ( (Windows, Mac OS X, Linux)