useful presentation for both students and also for teachers. i just share it because i want that everyone can get benefit from it. it consists definition of command and statement and its examples
2. • Commands are instructions that tell the computer to perform a specific action.
• The same command can be used in the same form within any program.
3. There are many commands used In GW-Basic, lets discuss some of them with
its syntax.
• The CLS command :
The CLS command is used for clearing the screen.
• Syntax :
CLS
4. • The List command :
The LIST command displays the whole program, or part of the program, that
the computer is currently running.
• Syntax :
LIST (to list all the lines in the program)
LIST – 15 (to list lines 1-15 only)
LIST 10 – 15 (to list lines LIST 10 – 15 of the program)
5. • The SAVE command :
The SAVE command is used to save a program on a disk. It is important to
specify the name of the program.
• Syntax :
LOAD “<filename>” [,R]
6. • Statements are instructions that tell the computer to perform an action that is unique
to the program being run.
• Almost every line of instruction in a program begins with a statement.
7. • There are many statements used In GW-Basic, lets discuss some of them with its
syntax.
• The REM statement :
The REM statement is used to insert a remark or comment in a program. It is
usually the first line of a program.
• Syntax :
REM <remark>
8. • The INPUT statement :
The INPUT statement is used to enter some value into the computer through
keyboard.
• Syntax :
INPUT “<prompt>”,<variable>
• The prompt is any massage that we want to display on the screen.
9. • The PRINT statement :
The PRINT statement tells the computer to display some data or the result of
processing on the monitor.
• Syntax :
PRINT <expression>
PRINT “<prompt>”
PRINT “<prompt>”;<expression>
10. In this topic we learned about :
• Commands
• Statements
• Different types of commands and its syntax
• Different types of statements and its syntax
• In next class we will learn about some more commands and statements.