1. Built-in Functions in Pseudocode

Built-in functions are pre-defined functions that provide common operations for string manipulation, type conversion, and character handling. These functions are available by default and can be used without declaring them first.


2. String Length and Manipulation

LENGTH Function

Returns the number of characters in a string.

Syntax:

Loading...

Example:

Loading...

LEFT Function

Extracts a specified number of characters from the beginning of a string.

Syntax:

Loading...

Example:

Loading...

RIGHT Function

Extracts a specified number of characters from the end of a string.

Syntax:

Loading...

Example:

Loading...

MID Function

Extracts a substring of specified length starting from a given position.

Syntax:

Loading...

Example:

Loading...

3. Case Conversion

LCASE and UCASE Functions

Convert a single character to lower or upper case.

Syntax:

Loading...

Example:

Loading...

TO_UPPER and TO_LOWER Functions

Convert all characters in a string to upper or lower case.

Syntax:

Loading...

Example:

Loading...

4. Type Conversion

NUM_TO_STRING Function

Converts a number (INTEGER or REAL) to its string representation.

Syntax:

Loading...

Example:

Loading...

STRING_TO_NUM Function

Converts a string to its numeric representation.

Syntax:

Loading...

Example:

Loading...

INT Function

Returns the integer part of a real number.

Syntax:

Loading...

Example:

Loading...

5. Character Conversion

ASC Function

Returns the ASCII value of a character.

Syntax:

Loading...

Example:

Loading...

CHR Function

Returns the character corresponding to an ASCII value.

Syntax:

Loading...

Example:

Loading...

6. Summary

Built-in functions provide essential operations for:

  • String manipulation (LENGTH, LEFT, RIGHT, MID)
  • Case conversion (LCASE, UCASE, TO_UPPER, TO_LOWER)
  • Type conversion (NUM_TO_STRING, STRING_TO_NUM, INT)
  • Character conversion (ASC, CHR)

These functions are immediately available for use in your pseudocode and help simplify common programming tasks. Understanding and using these built-in functions effectively will make your pseudocode more concise and easier to write.