Basic HTML Version

|  | Table of Contents |  | View Full Version

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

    Program 2: To concatenate two or more string variables.

                     Operators

                     Operators are special symbols in BASIC-256 that carry out arithmetic or logical computation. The
                     value on which the operator is operating is called the operand. BASIC-256 divides the operators
                     in the following categories.

                     Arithmetic Operators

                     Arithmetic operators are used to perform arithmetic operations between two operands. The

                     arithmetic operators are defined in the following table:

                                                                                                   Example
                      Operator         Name          Description                                                 Output
                                                                                                (x=4 and y=2)

                                                     Adds values on both sides of the
                         +           Addition                                                       x + y           6
                                                     operator.

                                                     Subtracts right hand operand from
                          –         Subtraction                                                      x – y          2
                                                     left hand operand.

                                                     Multiplies values on either side of
                          *        Multiplication                                                    x * y          8
                                                     operator.

                                                     Divides left hand operand by right
                          /           Division                                                       x / y          2
                                                     hand operand.

                                                     Performs exponential (power)
                         ^          Exponential                                                     x ^ y          16
                                                     calculations on operands.

                                                                                         Introduction to BASIC-256       97

| 94 95 96 97 98 99 100 101 102 103 104 |