10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ProceduresLocal ProceduresYou can use a local procedure in 4GL to code a callable procedure for a singleframe, field, procedure, or user class script.Although you define local procedures in the frame, field, procedure, or userclass script in which they are called, you must declare a forward referencebefore you can define a local procedure. Put the forward reference in thedeclare block for the script in which the local procedure is defined.You define local 4GL procedures directly in the frame, field, procedure, or userclass script using the procedure statement as described in the followingsection.Use the callproc statement to call a local procedure defined in the currentframe or procedure. For more information see the Language Reference <strong>Guide</strong>online help.Declaring Forward References for Local ProceduresUse one of the following formats when declaring the local procedure forwardreference:localprocname = procedure returning typeofreturnvaluelocalprocname = procedure returning nonelocalprocname = procedureHow You Can Define Local ProceduresThe procedure returning none and the procedure formats are equivalent. Theyspecify that the procedure does not return a value.Use the following syntax to define a local procedure:procedure procname [([parameterlist])] =[declarelocalvariablelist[enddeclare]]beginstatementlistend[;]78 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!