Schoolans.com  # World Class Library Function in Qbasic

In Qbasic there are two types of function Library Function and User Defined Function. Functions provided by QBASIC system are called built-in or Standard or Library function in Qbasic. Library Function is again classified into String Function and Numeric Function. Mid\$(), Ltrim\$(), Rtrim\$() are String function. Len(), INT(), ABS() are Numeric Function.

Here we discuss about the library function in Qbasic and its types. In this section we discuss about Library Function in QBASIC.

## Use of Numeric Library Function in Qbasic

rem using library numeric function

cls
A\$ = “Pokhara”
A = 65.7
b\$ = “98”
print len(A\$)
print val(b\$) + 55
print int(a)
print abs(-90)
print sqr(16)
print ASC(“A”)
print str\$(54) + “hello”

Try the above program in your computer

REM Using the library string function
cls
A\$ = “POKHARA”
B\$ = “nepal”
A = 65
Print LEft\$(A\$,3)
PRint Right\$(A\$,2)
print mid\$(A\$,4,5)
print lcase\$(A\$)
print ucase\$(B\$)
print str\$(a) + str\$(90)
print chr\$(97)

Try the ab