|
|
|
|
|
- Operating mode
- Special case
"END:" label In french: "FIN :"
The END: label is used to define a code that will be systematically run at the end of process execution. This code will be run even if the exit from process is performed by RETURN or RETURN (except for an exception process triggered by ExceptionThrow). PROCEDURE CompareContenu(Fic1, Fic2)
nFic1 is int = fOuvre(Fic1, foRead)
nFic2 is int = fOuvre(Fic2, foRead)
IF nFic1 = -1 OR nFic2 = -1 THEN RETURN -3
sLigne1 is string = fLitLigne(nFic1)
sLigne2 is string = fLitLigne(nFic2)
nLigne is int = 1
LOOP
IF sLigne1 = EOT _AND_ sLigne2 = EOT THEN RETURN 0
IF sLigne1 = EOT THEN RETURN -1
IF sLigne2 = EOT THEN RETURN - 2
IF sLigne1 <> sLigne2 THEN RETURN nLigne
sLigne1 = fReadLine(nFic1)
sLigne2 = fReadLine(nFic2)
nLigne++
END
END:
fClose(nFic1)
fClose(nFic2)
Syntax
// Main code ... IF ...THEN ... RETURN 0 END ... IF ...THEN ... RETURN 1 END RETURN 2 // Statements run in all cases // at the end of process execution END: ...
Remarks The value to return is stored and the code following the "END:" label is run. The value is returned at the end of execution of the code following the "END:" statement Remark: The tag FIN: is also executed after automatic error handling if enabled (with the keywords "CASE ERROR:" and "CASE EXCEPTION:")..
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|