EndSub

Use this function to end each subroutine in a DAL subroutine library.

Syntax

EndSub

There are no parameters for this keyword.

BeginSub and EndSub must be paired for each script.

Example

Here is an example:

BeginSub SCRIPT1
* This script returns #x set to 2 if #x was equal to 1 on enter.
IF (#x = 1) THEN #x = 2;
END;
RETURN (#x);
EndSub

 

BeginSub Script2
* This script returns a negative one if #y was equal to 5.
if(#y = 5) then Return (-1);
end;
EndSub

Script1 is the name of the first script. Script2 is the name of the second one.

See also