TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • TestNG
  • Tools
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Flowgorithm

Create Variables in Flowgorithm Flowchart

Flowgorithm

Overview

To use the variables in a flowchart we need to create them. Variables  are named memory locations to hold or store data in the program. The flowchart identifies each variable with a name called as Identifier or Variable name. Creating variables in a Flowgorithm flowchart is a two-step process.

  • Declare the variable
  • Assign a value to the variable.

Declare Variable

We use the Declare shape to declare a variable. Give a name for the variable and specify the data type. To add the declare shape to the flowchart, click or left click on the arrow line between the Main and End symbols. Click on the Declare shape to add it.

 

Declare Symbol Flowgorithm

 

Double click on the Declare shape to open the Declare properties Window. We can give the variable name and set the data type from the Type drop-down. Please note that Identifiers must start with a letter and avoid naming variables with reserved words.

 

Declare properties Window

Assign value

To assign a value to a variable, double-click on the line and choose the Assign shape. Double click on the Assign shape to bring up the Assignment Properties window. Enter the variable name and the appropriate value and click on the OK button.

 

Assignment Properties Window

Example

Sample Declare and Assign shapes in a flowchart. A foo variable is declared as an Integer data type. The foo variable is assigned 25 as value.

When we assign value to the variable for the first time its called initialization. We have initialized variable foo to 25.

Declare and Assign Shapes

Constant vs Variable

In the above example, the foo variable can be re-assigned to another variable in the program flow. A variable can change its value during the flowchart or program run. On the other hand, Constant doesn’t change its value during the program run. The value of the constant will be the same throughout the flowchart/program.

Example:

pi = 3.1415 (approx)

pi value is a constant in the program. The value of pi is predefined by the Flowgorithm. We can use constants in the flowchart. Once assigned the value of constant would not change during the program run. It’s a good programming practice to denote user-defined constants in the flowcharts in the uppercase.

 

Flowgorithm Tutorials Link:

https://www.testingdocs.com/flowgorithm-flowchart-tutorial/

Flowgorithm Website:

http://flowgorithm.org/

Related Posts

Flowchart Style Flowgorithm

Flowgorithm /

Flowgorithm Tool Features

Control Panel

Flowgorithm /

Uninstall Flowgorithm on Windows

Source Code Generator Flowgorithm

Flowgorithm /

Source Code Generator Tool in Flowgorithm

Populate Array Flowgorithm Flowchart

Flowgorithm /

Populate Array with User Input in Flowchart

Flowgorithm /

Recursion in Flowgorithm Flowchart

‹ Data Types in Flowgorithm Flowchart› Getting User Input in Flowgorithm Flowchart

Recent Posts

  • Antivirus Products for Windows 11 PC
  • Install CodeBlocks IDE on Windows 11
  • Location Privacy Settings on Windows
  • Windows 11 Virus & Threat Protection
  • Download & Install Python on Windows 11
  • Cumulative Update for Windows 11 Version
  • Test execution speed in Selenium IDE
  • Check Windows 11 Free Upgrade
  • Download IntelliJ IDE on Windows 11
  • New MySQL Connection in Workbench

Back to Top

Automation Tutorials

  • JBehave Tutorial
  • Selenium Tutorial
  • TestNG Tutorial
  • JUnit Tutorial

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version