Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.37 KB

CodeBlockBeforeSub.md

File metadata and controls

33 lines (22 loc) · 1.37 KB

Method definitions must be placed before the module body operators (CodeBlockBeforeSub)

Description

The structure of the software module (in general form) is clearly defined:

  • first comes the variable definition block
  • then definitions of procedures and functions
  • then the module code block

Based on the structure described above, the location of the program code before the definition of methods is unacceptable.

Examples

Incorrect

SomeMethod();
Message("Before methods definition");

Procedure SomeMethod()
// Method body
EndProcedure

Sources