|
|
|
|
|
In most cases, old code contains procedures that are used but that do no longer match the current quality standard. In this case, a new procedure version is created, with different parameters. As all the existing calls cannot be modified straightaway, you have the ability to indicate that the former version becomes a zombie procedure. In this case: - When recompiling the project, a warning is used to indicate all the calls to the zombie procedure.
- Whenever the zombie procedure is used, a specific logo is displayed beside the call during 10 seconds and a compilation warning is generated.
- The zombie procedure appears grayed out and struck through in the "Project explorer" pane.
To indicate that a procedure is a zombie procedure, the procedure declaration must be followed by the <Zombie> attribute extension. The syntax is as follows: PROCEDURE <Procedure name>(<Parameters>) <zombie [comment = "text"]> [: <Type of return>] PROCEDURE <Procedure name>() <zombie [comment = "text"]> [: <Type of return>] In these syntaxes, the optional comment keyword is used to specify the text that will be displayed in the compilation error associated with the obsolete procedure. Example - Code of the procedure:
PROCÉDURE AddTreeView(sNode, sMonth, sImageDate, sImage)<zombie comment = "use AjFull">  // Check to find out whether the year exists IF TreeStatus(TreeCommand, sNode) = tvError THEN // it does not exist, create it with all the months TreeAdd(TreeCommand, sNode, sImageDate, sImageDate, "", tvLast) AddMonth(sNode) END
- The zombie procedure appears grayed out and struck through in the "Project explorer" pane (when the element is recompiled).
- When typing the call to the function, a specific icon will be displayed during 10 seconds : and a compilation error containing the comment will be displayed:
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|