Difference between revisions of "CERROR()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return the number of the last error encountered during a compile operation
 
Function to return the number of the last error encountered during a compile operation
 
  
 
==Syntax==
 
==Syntax==
 
CERROR()
 
CERROR()
 
  
 
==See Also==
 
==See Also==
[[COMPILE]], [[DO]], [[ERROR()]], [[MENU FORMAT]], [[MESSAGE()]], [[SET COMPILE]], [[SET DEVELOPMENT]], [[SET PROCEDURE]]
+
[[COMPILE]], [[DO]], [[ERROR()]], [[SET PROCEDURE]]
 
+
  
 
==Description==
 
==Description==
The CERROR() function returns the number of the last error message encountered during a compile operation.  If no compiler errors are found, the CERROR() function returns a zero.  The COMPILE command is used to compile program files; however other commands may also cause a program file to be compiled. These commands include: DO, SET PROCEDURE and MENU FORMAT.
+
The CERROR() function returns the number of the last error message encountered during a compile operation.  If no compiler errors are found, the CERROR() function returns a zero.  The COMPILE command is used to compile program files; however other commands may also cause a program file to be compiled.
 
+
  
 
==Example==
 
==Example==
Line 29: Line 25:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Error Handling and Debugging]]
+
[[Category:Error Handling]]
[[Category:Error Handling and Debugging Functions]]
+

Latest revision as of 10:16, 4 February 2013

Purpose

Function to return the number of the last error encountered during a compile operation

Syntax

CERROR()

See Also

COMPILE, DO, ERROR(), SET PROCEDURE

Description

The CERROR() function returns the number of the last error message encountered during a compile operation. If no compiler errors are found, the CERROR() function returns a zero. The COMPILE command is used to compile program files; however other commands may also cause a program file to be compiled.

Example

procedure comp_err
  on error
  if cerror() > 0
      dialog box "Compile Error#" +;
      str(cerror() ,4)
  endif
return
 
on error do com_err
compile proclib.prg