Parameter scope in Raptor Procedure
Overview
Let’s understand the parameter scope in the Raptor procedure with an example. A Procedure is a set of execution flowchart steps that are invoked by using the Call flowchart symbol. The procedure allows parameters to be passed on each invocation
In Raptor there are below types of mechanisms for passing the parameters to procedures.
- Input
- Output
- Input/Output
Input Parameter scope
The caller flowchart i.e Main flowchart can pass input parameters to the procedure. The procedure flowchart is called callee. TheĀ callee is the procedure that is called by the Main flowchart. Input parameters have a local scope in the procedure flowchart. The changes made to the parameters are only valid in the procedure body.
Let’s consider a sample procedure Proc with input parameter inParam. The main flowchart will pass the input parameter. We can observe that even when the procedure changes the input parameter in the procedure steps the main flowchart variable inParam remains the same after the procedure call.
Output
InParam in main before proc call:=10
InParam passed from main:=10
InParam in procedure after modification:=12
InParam in main After proc call:=10
—-Run complete.
Output Parameter
Unlike the input parameter, the output parameter reflects or take the changes of the variable to the caller. So, if the procedure changes the value of the output parameter
the changesĀ are reflected to the caller of the procedure. In out case, the changes will reflect in the main flowchart.
RAPTOR Tutorial Page: https://www.testingdocs.com/raptor-a-flowchart-tool/
RAPTOR official website: https://raptor.martincarlisle.com/