Page 103 - TechPluse_C6_Flipbook
P. 103

Comments

                 In BASIC-256, comments are used to explain the program code. Comments help and enable us

                 to understand the way, a program works. In BASIC-256, comments start with single quote(#).
                 During the execution of the program, BASIC-256 ignores the line that starts with single quote.

                 The BASIC-256 editor shows all comments in green colour, so you can easily tell them apart from
                 the lines of actual code. For Example:


                                                                          Tech


                                                                            Funda

                                                                                         To open new BASIC-256:
                                                                                         Ctrl + N


                                       Comments

                     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.

                 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.
                 You can use the semicolon with the PRINT statement to show the output in the same line.
                 Example 1:
                 PRINT "Your age is: ";

                 PRINT 15
                 The preceding statements prints "Your age is: 15".
                 Example 2:
                 PRINT "The number is: ";

                 PRINT 123
                 The number is: 123
                 Example 3:
                 PRINT "The current year is: ";
                 PRINT 2025

                 The current year is: 2025


                                                                                     Introduction to BASIC-256       101
   98   99   100   101   102   103   104   105   106   107   108