Official Content

Calls a local subroutine defined in the same object.

Syntax

Do SubroutineName

Where:

SubroutineName
      Name of the subroutine to call.

Scope

Objects: Procedure, Transaction, Web Panel, Panel.
Generators: .NET.NET Framework, JavaAndroidApple.

Description

This command calls a local subroutine defined in the same object.

All the object variables are available to be used by the subroutine so, parameter-passing is not allowed. Also, instantiated attributes (loaded with values) are available to be used by the subroutine.

Samples

Consider the following code defined, for example, inside a Procedure Source or inside an object Event: 

...
If &ConfirmedTicket  //Boolean variable
   Do 'PrintTicket'  //The 'PrintTicket' subroutine is called
EndIf
...

Sub 'PrintTicket'
    ...              // Subroutine code
EndSub

See Also

Sub command
What is a subroutine?

 


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant