BASIC Programming II (Built-in Functions) for SS2
BASIC Programming II (Built-in Functions) for SS2 BASIC built in functions are predefined functions that performs a wide range of operation. A function is a structure that simplifies a complex operation into a single step. BASIC has a number of built-in functions that greatly extends its capability. They include the following: 1. SQR Function : The SQR function calculates the square root of a number. The general form of the function is SQR(X) Example : SQR(9) = 3 SQR(2) = 1.414214 2. INT Function : The INT function finds the greatest integer less than or equal to a number. The general form of the function is INT(X) Example INT(15.46) = 15 INT(-15.46) = -16 INT(15.56) = 15 INT(-15.56) = -16 3. CINT Function : CINT means Integer Conversion. This function is used to convert a number into an integer. It rounds off the number to the nearest integer value. Example CINT(15.46) = 15 CINT(-15.46) = -15 CINT(15.56) = 16 CINT(-15.56) = 16 4. Fix Function : This function truncates the number int