| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== ERRORCODE (return error code number) ====== | [[error return error message .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[errorfile return error filename .htm|{{btn_next_n.gif|Next page}}]] | | || **ERRORCODE( )** {{blk2blue.jpg|blk2blue.jpg}} The **ERRORCODE** procedure returns the code number for any error that was posted. If no error was posted, ERRORCODE returns zero. You should interrogate ERRORCODE immediately after the statement that you suspect may post an error because processing any other statement that could post an error will clear the internal error code. | **Return Data Type:** | LONG | **Example:** **ADD(Location)              !Add new entry** **IF ****ERRORCODE****() = 8         !If not enough memory** ** MESSAGE('Out of Memory')  !display message** **END** **See Also:** [[error return error message .htm|ERROR]] [[errorfile return error filename .htm|ERRORFILE]] [[fileerror return file driver error message .htm|FILEERROR]] [[fileerrorcode return file driver error code number .htm|FILEERRORCODE]] [[poperrors return error information .htm|POPERRORS]] [[pusherrors write error information .htm|PUSHERRORS]] [[trappable run time errors.htm|Trappable Run Time Errors]]