Raptor symbols

The six symbols used in Raptor are displayed in the Symbol Window in the upper left corner of the main window:

 

 

Assignment

 

The assignment symbol is used to change the value of a variable.  The right hand side of the assignment is evaluated, and the resulting value is placed in the variable on the left hand side.  For example, consider the case where the value of x is currently 5, and the assignment "x <- x + 1" is executed.  First "x+1" is evaluated, yielding the result 6.  Then the value of x is changed to be 6.  Note that assignment is very different from mathematical equality.  The statement should be read "Set x to x+1" instead of "x equals x+1". The assignment symbol can also be used to assign a string expression to a string variable (see String Variables & Assignment).

 

Call

 

The call symbol is used to invoke procedures such as graphics routines and other instructor-provided procedures.  The call symbol is also used to run subcharts included in a Raptor program..

 

Input

 

The input symbol is used to ask the user for a number or string while the flowchart is executing.  When an input symbol is executed, the user will be prompted with a dialog to enter a value that can be interpreted as either a number or string, depending on what the user types  (see String vs. Numeric Input).  The user can also override the source for input by specifying a text file to be used in place of the keyboard (see Inputting from a File)

 

Output

 

The output symbol is used to either write a number or text to the Master Console window.  The user can also override the destination for output by specifying a text file to be used instead of the Master Console (see Outputting to a File).

 

Selection

 

The selection structure is used for decision making.  The programmer enters in the diamond an expression that evaluates to Yes (True) or No (False). Such expressions are formally referred to as Boolean expressions. Based on the result of the expression in the diamond, control of the program will branch either left (Yes, or True) or right (No, or False). For more information, see Boolean Expressions.

 

Loop Control

 

The loop structure is used to repeat a sequence of symbols until a certain condition is met.  When execution reaches the bottom of the loop, it starts over again at the top.  The loop is exited when the diamond symbol is executed and the Boolean expression in the diamond evaluates to Yes (True).  Again, more information can be found in Boolean Expressions.