Site icon Pathshala Nepal

Write the use an syntax of following library function.

Qbasic
Online Calculator

Write the use an syntax of following library function.


1 Answer


1.LEN

Function: It is used to return the length of a string. It counts the number of characters and returns the number.

Syntax: LEN (string constant/variable)

2.STR$

Function: It is used to convert a number into a string constant.

Syntax: STR$ (Numeric value/variable)

3.VAL

Function: It is used to convert a string into a numeric constant.

Syntax: VAL(String constant/variable)

4.UCASE$

Function: It is used to change a string into upper case characters.

Syntax: UCASE$(string)

5.LCASE$

Function: It is use to change a string into lower case characters.

Syntax: LCASE$(string)

6. LTRIM$ and RTRIM$

Function: The function of LTRIM$ is to trim or cut the leading spaces from a string.The function of RTRIM$ is to trim or cut the following spaces from a string.

Syntax: LTRIM$(string) RTRIM$(string)

7.MID$

Function: It is used to extract specified number of characters from a specified position in the string.

Syntax: MID$ (string, starting position, value)

8.LEFT$

Function: It is used to extract specified number of characters from the left of a given string.

Syntax: LEFT$(string, value)

9.RIGHT$

Function: It is used to extract specified number of characters from the right of a given string.

Syntax: RIGHT$(string, value)

10.ASC

Function: It is used to return the ASCII value of a given character.

Syntax: ASC (character, string, string variable)

11.CHR$

Function: It is used to return the character from a given ASCII number.

Syntax: CHR$ (numeric value)

12.SPACE$

Function: It is used to return the number of spaces

Syntax: SPACE$(value)

13.DATE$

Function: It is used to return current system date.

Syntax: DATE$

 

Topics from Computer
Related Questions