A function is an operation which produces a single result on some data and can be used as part of an expression. BASIC provides a large number of utility functions which are part of BASIC language and are known as Built-in function (or Library functions). The data upon which the function acts to produce the desired result is known as argument of the function. The argument can be a variable, a constant or an expression. The argument is to be enclosed in a pair of brackets.
Example :
1. 10 PRINT ABS (X)
2. 10 PRINT LEN ("COMPUTER")
The functions in BASIC can be divided into the following categories :
1. String function
2. Arithmetic function
3. Trigonometric function
No comments:
Post a Comment