A computer program, also called software, is a way to tell a computer what to do. Everything that the computer does, from booting up to shutting down, is done by a program. Windows XP is a program. Ms. Pac-Man is a program. The dir command used in MS-DOS to display filenames is a program. Even an email virus is a program.
Computer programs are made up of a list of commands the computer handles in a specific order when the program is run. Each of these commands is called a statement.
The following is one of the simplest examples of a computer program, written in BASIC. Take a look at it, but don't worry yet about what each line is supposed to mean.
1 PRINT "Shall we play a game?" 2 INPUT A$
Each of the lines in the computer program is a statement. A computer handles each statement in a program in a specific order, in the same way that a cook follows a recipe, or Rosie the robot followed the orders of Jane Jetson when she vacuumed and shopped at the market. In BASIC, the line numbers are used to put the statements in the correct order. Other languages, such as Java, do not use line numbers, favoring different ways to tell the computer how to run a program.
BASIC program running on the Liberty BASIC interpreter, a shareware program that can be used to develop Windows and OS/2 programs. Liberty BASIC, which was developed by Carl Gundel, is among many BASIC interpreters that can be found on the Internet for Microsoft Windows, Apple Macintosh, and Linux systems.


11:24 AM
mitraaa
0 comments:
Post a Comment