About Procedures

A procedure is a set of instructions that works as a unit and can be called from a test or another procedure. This chapter describes ATEasy user-defined procedures and includes the following topics:

 

Topic

Description

Procedures Overview

Introduces the different types of procedures and especially user-defined procedures which are discussed in this chapter.

Procedures View

Describes the various parts of a Procedures View: the Procedures Combo Box, the Procedure Description View, the Variables View, and the Code View.

Creating Procedures

Shows how to create procedures, define their properties, and use procedure variables.

Procedure Properties Window

Describes the fields on the General Page of the Procedure Properties Window.

Declaring the Return Type

Explains the types of value a procedure can return: a subroutine procedure returns no value; a function procedure returns a value.

Declaring Procedure Variables

Describes how to declare procedure variables (parameters and local variables) in the Variables View of the Procedures View.

Procedure Local Variables

Shows how to define a local variable in the Variable Properties window.

Procedure Parameters

Shows how to define a parameter (Val or Var) in the Variables Properties window.

Variables Order in the Procedures Window

Explains the list order of parameters and variables in the Procedures window. Parameters are automatically listed before the local variables if both local variables and parameters are used.

Compatible Argument Types

Shows a table listing the compatible variable data types used as parameters that are passed by Val and Var.

Returning Values in Procedure Code

Describes steps to take when you want a procedure to return a value.

Calling Procedures

Shows how an example function procedure is used in the Code View.

How ATEasy Searches for Procedures

Explains how ATEasy searches for the procedure to locate where it is defined when a procedure name is called.

Example of a Procedure with a Var Parameter

Describes an example of a subroutine procedure with Var parameters that compares numbers, stores the result as a Var, and returns a value.

Example of a Procedure Returning a Value

Describes an example of a function procedure that calculates an average of numbers in an array and returns a value.