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
Commands
Next
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 (www.microsoft.com/express) (Windows only)
Turbo Delphi, Turbo C++, Turbo C# compilers (www.turboexplorer.com) (Windows only)
REALbasic (www.realbasic.com) (Windows, Mac OS X, Linux)
Runtime Revolution (www.runrev.com) (Windows, Mac OS X, Linux)
Ruby (www.ruby-lang.org) (Windows, Mac OS X, Linux)
Java (www.java.com), (Windows, Mac OS X, Linux)
Python (www.python.org) (Windows, Mac OS X, Linux)
Perl (www.perl.org) (Windows, Mac OS X, Linux)
PHP (www.php.net) (Windows, Mac OS X, Linux)
GNU Compiler Collection (http://gcc.gnu.org) (Windows, Mac OS X, Linux)
Dev-C++ and Dev-Pascal (www.bloodshed.net) (Windows only)
Free Pascal (www.freepascal.org) (Windows, Mac OS X, Linux)
NSBasic (www.nsbasic.com) (Windows, Palm, Symbian OS)
SWI-Prolog (www.swi-prolog.org) (Windows, Mac OS X, Linux)
CLISP (http://clisp.cons.org) (Windows, Mac OS X, Linux)
>
>
dummies
Source:http://www.dummies.com/how-to/content/beginning-programming-allinone-for-dummies-cheat-s.html
No comments:
Post a Comment