Structure Programming

 

Components

 

 

Procedure may be a generated server file (*.prg) or inline procedure.

Procedure does not return a value.

 

Scope of variables:

 

Variables may have the following scope:

LOCAL: Visible only within the routine which declared it. Value is lost upon exit of the routine.

STATIC: Visible only within the routine which declared it. Value is preserved for subsequent invocations of the routine. If a STATIC variable is declared before any Procedure/Function/Method is defined, it has a MODULE scope, and is visible within any routine defined within that same source file, it will maintain its life for the duration of the application life time.

PRIVATE: Visible within the routine which declared it, and all routines called by that routine.

PUBLIC: Visible by all routines in the same application.

Due to the dynamic nature of PRIVATE and PUBLIC variables, they can be created and destroyed at Run-time

 

Example - Screen shots:-

 

Domain (Structure Programming) Component (Call Procedure)

 

Interaction Page

 

Domain (Structure Programming) Component (Call Function)

 

Interaction Page

 

Domain (Structure Programming) Component (Define Procedure)

 

Interaction Page

 

Steps Tree

 

Interaction Page

 

Domain (Structure Programming) Component (Define Function)

 

Interaction Page

 

Interaction Page

 

Steps Tree

 

Final Steps Tree

 

Final Application