Site icon TestingDocs.com

Array in Raptor Flowchart

Introduction

An array is a data structure. It is a collection of elements of the same data type. Array elements are stored in contiguous memory locations. Individual array elements in an array can be accessed by the index. All objects that are stored in the array must be of the same data type.

For Example, if the array is a number array then all the objects in the array must be numbers. An object in the array is associated with an integer index which can be used to locate the object. The first object of the array has index 1. Unlike in most programming languages like C, and Java where the array index starts with 0, in the Raptor flowchart, the index of an array starts at 1.

Array Example

A single-dimensional array of size 5 that holds fruit names.

 

Chess Board

The chess board is an example of a 2D ( Two dimensional ) array of chess pieces.

Sample Flowchart

Let’s use a single-dimensional array to calculate the sum of rainfalls in a city using the Raptor flowchart. We use rainfall as an array variable to hold the rainfalls of the city.

Individual array elements in the array can be accessed using rainfall[index],

the index is an integer and starts with 1

We can also store variables in the array using the index. For example, to store 12 cm of rainfall for the 3rd month, we can use

rainfall[3] <- 12

 

The output of the flowchart

 

Reading values into an array

https://www.testingdocs.com/questions/how-to-read-values-into-an-array-using-raptor-flowchart/

RAPTOR Tutorials

Raptor Tutorials on this website can be found at:

https://www.testingdocs.com/raptor-a-flowchart-tool/

RAPTOR official website:

https://raptor.martincarlisle.com/

Exit mobile version