|
Concept
|
Pseudocode
|
Elements
|
Meaning
|
|
New Program
|
Creat a program called
PROGNAME
written by
AUTHOR
on
DATE
that does
PURPOSE
|
PROGNAME
|
Program name
|
|
AUTHOR
|
Program Author
|
|
DATE
|
Date Written
|
|
PURPOSE
|
Description of program
|
|
New Variable
|
Create a variable (container) called
NAME
of
TYPE
with starting value
INIT
that does
PURPOSE
|
NAME
|
Name of variable (container)
|
|
INIT
|
The starting value
|
|
TYPE
|
The kind of data the container is to hold.
Usually string, integer or real.
|
|
PURPOSE
|
What the variable does
|
|
Output
|
Output the value
STUFF
to the user.
|
STUFF
|
Value and/or variable to output.
This is usually a string.
|
|
Input
|
Ask the user
PROMPT,
then store the answer in
VARIABLE
|
PROMPT
|
A string question we are asking the user.
It will automatically be output to the user.
|
|
VARIABLE
|
The variable in which we place the response.
This variable must already exist and be of the
appropriate type.
|
|
Assignment
|
Assign
VALUE
to
VARIABLE
|
VALUE
|
A value of the appropriate type.
Can be a variable or expression.
|
|
VARIABLE
|
The variable in which we place the value.
Must already exist and be of the appropriate type.
|
|
Convert to Integer
|
Convert
STRING
to inter value and place in
NUMBER.
|
STRING
|
A value or variable
|
|
NUMBER
|
A numeric variable to contain the results
|
|
Get randoms
|
Get a random value and place it in
NUMVAR
|
NUMVAR
|
A numeric variable to contain the results.
|
|
If Condition
|
If
VARIABLE
-
COMPARISON
-
VALUE
is true, do the following code
|
VARIABLE
|
An existing variable to compare things to
|
|
COMPARISON
|
A type of comparison. Usually one of the following:
- == : equal to
- != : not equal to
- < : less than
- > : greater than
|
|
VALUE
|
The value to compare to. It must be of the correct type.
|
|
Else
|
If the previous condition is false, do the following
code. Must part of an If Structure.
|
|
|
|
End Structure
|
End of
STRUCTURE
|
STRUCTURE
|
Some programming structures (if, while, for, function)
require an end.
|
|
While Loop
|
Do the following code while
VARIABLE
-
COMPARISON
-
VALUE
|
VARIABlE
|
An existing variable to compare things to
|
|
COMPARISON
|
A type of comparison. Usually one of the following:
- == : equal to
- != : not equal to
- < : less than
- > : greater than
|
|
VALUE
|
The value to compate to. It must be of the correct type.
|
|
For Loop
|
Do the following code while incrementing
VARIABLE
from
START
to
FINISH
counting by
STEP
|
VARIABLE
|
The variable we will be counting with
|
|
START
|
The starting value of
VARIABLE
|
|
FINISH
|
The ending value of
VARIABLE
|
|
STEP
|
The counting pattern (if
STEP
is 5, then count by 5's)
|
|
New Function
|
Create a new function callled
NAME
with these
PARAMETERS
that returns
RETVAL,
which is
RETTYPE
|
NAME
|
The name of the function
|
|
PARAMETERS
|
Any parameters the function takes
|
|
RETVAL
|
The return value
|
|
RETYPE
|
The type of
RETVAL
(void if none)
|
|
Make Global Variable
|
Creats a global variable called
NAME
of
TYPE
with starting value
INIT
that does
PURPOSE
|
NAME
|
Name of the variable
|
|
INIT
|
The starting value
|
|
TYPE
|
The type (often string, integer, real)
|
|
PURPOSE
|
What the variable does
|
|
Form Output
|
Output the
VALUE
to a GUI form (not possible in every language)
|
VALUE
|
String Value to output. Can be concatenated.
|
|
Form Input
|
Go to the form input area and place the value in
VARIABLE
(generally used with button click)
|
VALUE
|
A string variable which will contain input
|
|
Button Click
|
Write a function to handle button click event processing
|
|
|