Task 3 Flashcards
State:
Assigns a value to a
variable
SET Variable TO value
Describe:
SET Variable TO
expression
Computes the value of an
expression and assigns to a
variable
State:
Assigns a value to an
element of a twodimensional array
SET Array [RowIndex,
ColumnIndex] TO value
State:
If statement with else
IF expression THEN
command ELSE
command END IF
State:
While loop
WHILE condition DO
command END WHILE
Describe:
REPEAT
command UNTIL
expression
Post-conditioned loop
State:
For loop
FOR id FROM
expression TO
expression STEP
expression DO
command END FOR
Describe:
FOR EACH id FROM
expression DO
command END FOREACH
Count controlled loop.
Executes for each element
of an array
State:
Sends output to the screen
SEND expression TO
DISPLAY
State:
Input from type of device
RECEIVE <identifier> FROM
(type)</identifier>
Describe:
READ file record
Reads in a record from a
file and assigns to a
variable.
Each READ statement reads
a record from the file
Describe:
WRITE file record
Writes a record to a file.
Each WRITE statement
writes a record to the file
Describe:
Defines a procedure
PROCEDURE id
(parameter, …) BEGIN
PROCEDURE
command END
PROCEDURE
Describe:
FUNCTION id
(parameter, …)
BEGIN FUNCTION
command RETURN
expression END
FUNCTION
Defines a function
Describe:
id (parameter, …)
Calls a procedure or a function