28 lines
583 B
Plaintext
28 lines
583 B
Plaintext
Even if there's no data to be returned from a procedure, each procedure should at least return a boolean to indicate when procedure execution failed, so callers can respond accordingly.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
D MyProc PI
|
|
D param1 10A const
|
|
/free
|
|
// do work...
|
|
return; // Noncompliant
|
|
/end-free
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
D MyProc PI N
|
|
D param1 10A const
|
|
/free
|
|
// do work...
|
|
return *ON;
|
|
/end-free
|
|
----
|
|
|
|
|