Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 106 - 2505_CoreGPT(Podar)_Flipbook_C6
P. 106

    more on BASIC-256
                              9                                  statements

                           Goal Glimpse

                              Statements                                  Conditional Statements

                              GOTO Statement                              IF-THEN Statement
                              IF-THEN-ELSE Statement                      Nested IF Statement

                      We make decisions in our daily life, based on the conditions that we are in or the conditions that
                      we know we will face in a particular situation. For example, in the above situation, your decision
                      will be based on a condition, if the lift is working, take the lift or else climb the stairs. We face
                      similar situations when we are programming. We have to make some decisions and based on
                      these decisions the statements in the program are executed. In some conditions, our program

                      statements are based on the outcome. If the outcome is true, one set of commands is executed
                      and if the outcome is false, the second set of commands is executed.

                            STATEMENTS

                      Every line of a program is a statement and every statement is an instruction for the computer.
                      Let's discuss some of the statements of BASIC-256.

                      CLS

                      The CLS statement is used to clear the previous output of any program from the Text Output

                      area.
                      PRINT Statement

                      BASIC-256 uses the PRINT statement to display the output in the Text Output Area. The syntax
                      of the PRINT statement is as follows:

                      PRINT "text to be printed"
                      For Example:

                      PRINT "Welcome to Orange Education"
                      Preceding statement prints the Welcome to Orange Education message in the Text Output Area.

                    104     Premium Edition-VI

| 101 102 103 104 105 106 107 108 109 110 111 |