Declare variables in Raptor Flowchart
In this post,we will learn how to declare variables in RAPTOR flowchart. We use variables in the flowchart to store and retrieve data. Variable has name, value. Variables have data types. Valid syntax
variable <- value
variable <- expression
Data types in RAPTOR
Supported data types in RAPTOR are as follows:
We can use the assignment symbol to declare and store values in variables. Drag and drop an assignment symbol to the flowchart. Double click on the symbol. Examples are shown below:
In the example, count is the variable that holds a Number data type. The value of the variable is assigned to 0.
count <- 0
distance <- velocity * time
String is a sequence of characters enclosed within quotes. For example name is the variable that holds a String data type. The value of the variable is assigned to “Alice”
name <- “Alice”
Array variable are used to store values of same data type. Individual elements of the array are stored and retrieved using the index. In RAPTOR the array index starts with 1. Array variables have dimensions like one dimension, two dimension etc.
Example of one dimensional array variable to store scores of 3 subjects of a student.
scores <- 73
scores <- 94
scores <- 88
RAPTOR tutorial page: https://www.testingdocs.com/raptor-a-flowchart-tool/
RAPTOR official website: https://raptor.martincarlisle.com/