Programming terminology Flashcards
What kind of development methodology does modular programming follow?
A top-down design with stepwise refinement (with the use of sub programs).
What is a subprogram?
A section of code which is self-contained but is designed to be used with other subprograms.
What does a procedure do?
It produces an effect!
What does defining a procedure involve?
You have to give it a name and state what data will be passe through it.
What is a function? (IMPORTANT)
It is like a procedure but it only returns one value. Examples include SQR, RND and COS.
What is a variable?
A variable is a name given by the programmer to identify storage locations.
Describe a global variable
They can be accessed by any location in the program, and is used for data that needs to be shared between the procedures.
Describe a local variable
They are defined for use within one procedure.The data that they contain is lost when the procedure is complete. This avoids conflict with similar variable names.
What is the scope of a variable?
It is the range of statements for which a variable is valid.