progress-4glProcedures


Introduction

There are two types of procedures in Progress ABL: internal procedures and procedure prototypes that are facades to Windows dlls or Unix/Linux shared library procedures.

Just like with functions, procedures cannot be nested. You cannot nest functions in procedures and vice versa.

A procedure is called with the RUN statement.

Syntax

  • RUN procedurename. //Runs a procedure called procedurename.

  • RUN proc1(INPUT "HELLO"). //Inputs the string HELLO to proc1

  • RUN proc2(INPUT var1, output var2). //Inputs var1 and outputs var2 to/from proc2

  • RUN proc3(input "name = 'joe'", OUTPUT TABLE ttResult). //Inputs name=joe and outputs records in a table

  • PROCEDURE proc: // Declares a procedure named proc

  • END PROCEDURE. // Ends the current procedure