SLC QBASIC LIBRARY FUNCTIONS




(PART A) Write the functions of:
1. LEFT$:
LEFT$ is a string function that allows us to extract the specific number of characters beginning from the left-most character of the string.
2. RIGHT$:
RIGHT$ is a string function that allows us to extract the specific number o characters beginning from the right-most character of the string.
3. MID$:
MID$ function returns a specific number of characters from a string.
4. LEN:
LEN function returns the number of characters in a string or the number of bytes required by a variable.
5. LCASE$:
LCASE$ function converts all the uppercase characters in lowercase.
6. UCASE$:
UCASE$ function converts string to uppercase.
7. ASC:
ASC function converts a character or a string variable to its corresponding ASC II code. Only the first character of a string is evaluated by ASC function.
8. CHR$:
CHR$ function retrieves the single character represented by the ASC II number.
9. STR$:
STR$ function converts a string expression to its string representation.
10. VAL:
VAL function converts a string expression consisting of digits into numeric value.
11. LTRIM$:
LTRIM$ function removes leading blanks from the left side of the spring expression.               

12. RTRIM$:
RTRI$ function removes trailing blanks from the right side of the string expression .
13. STRING$:
STRING$ function is used with a PRINT statement to display a particular character a specific number of times.
14. INSTR:
INSTR function returns the position of the first occurrence of a string in another string.
15. DATE$:
DATE$ function returns the current system date of the computer and allow to set the current system date.
16. TIME$:
TIME$ function returns the current system time of computer and allows to set the current time.
17. INKEY$:
 INKEY$ function checks the keyboard looking for a pressed key.
18. INPUT$:
INPUT$ function halts execution until a specified number of characters are read from the keyboard or a disk file.
19. ABS:
ABS function is used to obtain the absolute value of a numeric expression.
20. COS:
COS function computes the cosign of an angle.
21. TAN:
TAN function is used to obtain the tangent of x.
22. SIN:
SIN function is used to obtain the sine o an angle.

23. INT:
INT function is used to round the number to the integer value.
24. CINT:
CINT function returns the nearest to the given number.
25.SGN:
SGN function returns the sign of a number.
26. SQR:
SQR function returns the square root  of a number.
27. TAB:
TAB function moves the text cursor to the specified print position.
28. SPC:
The SPC function skips a number of spaces when used with the PRINT and the LPRINT statement.
29. SPACE$:
The SPACE$ function is used to print a specific number of blank spaces.
30. LOCATE:
The LOCATE statement controls the cursor, placing it on the specific row and column on the screen.

Comments

Bechu Gaud said…
could you write a program, date converter (i.e. AD to BS and vice-versa)

Popular posts from this blog

PROGRAM TO FIND SQUARE, CUBE, SQUARE ROOT AND CUBE ROOT OF GIVEN NUMBER

PROGRAM TO DISPLAY SUM, PRODUCT, DIFFERENCE AND PRODUCT OF TWO / THREE NUMBERS

PALINDROME AND ARMSTRONG PROGRAMS