Pre-Defined Functions Notes
Pre-Defined Functions Notes
Pre-Defined Functions
A pre-defined function is a function already built into the programming language which performs
mathematical calculations, manipulates text, and formats values. Most programming languages have
hundreds of pre-defined functions that can be used at any time to perform a specific task.
Mid$(“computer, 4, 3) returns
put
ASC ASCII Asc(“A”) returns 65 Returns the ASCII value of A-Z (upper case)
a character ASCII values between 65
and 90
CHARACTER CHR Chr(97) returns a Takes an ASCII value and
returns the corresponding a – z(lower case)
character ASCII values between 97
and 122
INTEGER INT INT(3.7556) returns 3 Returns the whole
number part of a real
number
CONVERSION CINT CINT(3.7556) returns 4 Rounds a real number to
INTEGER the nearest integer
MODULUS MOD First MOD second Returns the remainder of
first divided by second
7 MOD 3 returns 1
Parameters
Function Parameters
Round(weight, 0) Weight and 0
Len(pupil_ID) Pupil_ID
SQRT(number) Number