Pseudocode BuiltIn Functions P2 PDF
Pseudocode BuiltIn Functions P2 PDF
In each function, if the function call is not properly formed, the function returns an error.
returns the character value representing the lower case equivalent of ThisChar.
If ThisChar is not an upper-case alphabetic character then it is returned unchanged.
Example: LCASE('W') returns 'w'
1
MOD(ThisNum : INTEGER, ThisDiv : INTEGER) RETURNS INTEGER
returns the integer value representing the remainder when ThisNum is divided by ThisDiv.
Example: MOD(10,3) returns 1
returns the integer value representing the whole number part of the result when ThisNum is divided
by ThisDiv.
Example: DIV(10,3) returns 3
returns the single character at position Position (counting from the start of the string with
value 1) from the string ThisString.
returns an integer which is the ASCII character code for the character ThisCharacter.
2
CHR(Value : INTEGER) RETURNS CHAR
returns the character value representing the upper case equivalent of ThisChar.
If ThisChar is not a lower case alphabetic character then it is returned unchanged.
Example: UCASE('h') returns 'H'
Errors
For any function, if the program calls the function incorrectly, the function returns an error.
Operators (pseudocode)
Operator Description
Concatenation operator
For example: "South" & " " & "Pole" produces "South Pole"
'B' & "000654" produces "B000654"