Basic HTML Version

|  | Table of Contents |  | View Full Version

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

    CONDITIONAL STATEMENTS

                      Decision making in BASIC-256 is done by conditional statements or decision-making statements
                      which decide the direction of the flow of program execution. Since they control the execution of

                      the program, we also call them Control statements. Control statements available in BASIC-256
                      are given below:
                          GOTO Statement

                          If-Then Statement

                          If-Then-Else Statement

                          Nested If Statement

                            GOTO STATEMENT

                      The GOTO statement is used to control the flow of a program by directing the program to
                      jump to a specific line number or label within the code. When the GOTO statement is executed,

                      the program execution moves directly to the specified location, bypassing any intermediate lines
                      of code.
                      The syntax of the GOTO statement is given below:

                      Syntax:

                      GOTO <label>

                      <label>:
                           Statements to be executed

                      Program 1: To demonstrate GOTO statement.

                    106     Premium Edition-VI

| 103 104 105 106 107 108 109 110 111 112 113 |