User Defined Functions in Flowgorithm
In this tutorial, we will learn about User-defined Functions in Flowgorithm flowcharts. Large flowchart logic can be broken down into small and simple manageable modules. These modules can be
The modules that are capable of returning values to the caller are known as functions. The main advantage of function is code reusability.
What is a Function?
A function is an independent piece of flowchart statements that performs a specific task for the caller when invoked. For Example, the Main flowchart can define and invoke a Function named Add().
In-Built vs User-Defined
Flowgorithm flowchart has some in-built functions that we can invoke in the flowcharts directly. These functions are called Intrinsic functions or In-built Functions.
The Flowgorithm flowchart tool allows us to create and define functions in the flowchart. The function defined by the user is called a user-defined function. User-Defined Functions are defined by the user. The user needs to add code and logic to the function in the flowchart. A Function returns a value to the caller.
Function manager allows you to create, edit and delete functions in Flowgorithm flowchart.
We can use the Function manager to create a Function. To launch the Function Manager, Choose from the Menu
Program >> Function Manager
Click on the Add button to add a new Function.
Alternatively, Program >> Add Function… menu option will directly open the Function properties window.
In the Function Properties window, we can specify the function details. Specify the function details and click on the OK button to add the function.
Invoking a Function
To invoke the function use the Call statement. The Call statement transfers the control from the caller to the function. We can even invoke the function in the Assignment statement. Invoking the function is by its name and passing the required input arguments. We can assign the return value of the function to a variable.
Flowgorithm Tutorials Link: