Functions and Libraries

View Code

A lot of these definitions a notes are very interrelated. It is recommended that you read this twice and see the Tracing Functions page.

Functions

Function
a define block of coding able to be used in other blocks of code
Function Header
the name of a function plus other modifiers such as return type and parameters
Call
to use a function in coding
Return
a function returns a value
void
a function return type that specifies that there is no return value
Overload
to define a function with the same name but with different parameters
Default
to assign a value in a function parameter if no actual parameter is passed
Main
a function often used to run the entire program

Variable Sight and Life

Scope
the range in which a variable can be accessed by a function
Life
the range in which a variable exists while a program is running
Global scope
to be able to be accessed by all functions
Global Variable
a variable with global scope that exists from the beginning till the end of a program
Local Variable
a variable with scope of only the function they are defined in and only exists from when they are declared till the end of the function they are declared in
Static Variable
a variable that exist from its declaration till the end of a program

Parameters

Parameters
variables that a function receives for processing
Formal Parameter
the variable of the parameter of a function
Actual Parameter
the variable used to call the function
Pass
to transfer information of the actual parameter to the formal parameter
Pass by Value
a parameter passes the value of the actual parameter
Pass by Reference
a parameter passes the memory address/location of the actual parameter
Constant Pass by Reference
a parameter that is passing by reference but is made constant
Pass by Text
a parameter passes the text of a variable

Specification Documentation

Precondition
a condition that must be true for a function to be called properly
Postcondition
a condition that exist after the function is called

Libraries

Library
a file or group of files with defined functions that a program can include so its function can be used
Current
the folder/directory where the code source file, programming project file, executable file, or byte code file is
Include
the folder/directory where basic/default library files are

See also Tracing Functions.

Prev -- Back to Portal -- Next