chapter 11 Flashcards
input
entering data into a system
process
manipulate or change data in some way, perform a calculation, find a result
output
send data out from the system, display or print data
variable
a variable is a storage location with an identifier. the value of the variable can change.
constant
a constant is a named storage location. the value of the constant can not change.
types of loops
count controlled
pre-condition
post-condition
count-controlled loop
Iterates a set number of times. A FOR loop.
post-conditional loop
a post-conditional loop must run at least once. the condition is evaluated at the end. A REPEAT…UNTIL loop
pre-conditional loop
the pre-conditional loop doesn’t always run. this evaluates the condition at the start. A WHILE loop
logic statement examples
- IF…THEN…ELSE…ENDIF
- CASE OF…OTHERWISE…ENDCASE
CASE statement
a selection of multiple pathways
each condition can be:
* a single value
* single values separated by commas
* range
CASE OF <expression>
<value1>: <statement(s)>
<value2>, <value3>: <statements(s)>
<value4> to <value5>: <statement(s)>
OTHERWISE <statement(s)> //optional; used for error trapping
ENDCASE</value5></value4></value3></value2></value1></expression>
modular programming
process of subdividing a computer program into separate sub-programs.
modules
separate software component
subroutine
a set of instructions that performs a specific task as part of a larger program.
procedure
a subroutine that doesn’t return a value
PROCEDURE <identifier> (<parameter1>: <dataType> …)
<statement(s)>
ENDPROCEDURE</dataType></parameter1></identifier>
CALL <identifier></identifier>