V+ Language Reference Guide, v17.x


$ERROR string function

Syntax

$ERROR (error_code)

Function

Return the error message associated with the given error code.

Parameter

error_code Real-valued expression, with a negative value, that identifies an error condition.

Details

All the error codes returned by the IOSTAT function and by the ERROR real-valued function can be converted into their corresponding V+ error message strings with this function. (The ERROR real-valued function must be used to determine the variable portion of the error message for an error code less than or equal to -1000.)

See System Messages for a list of all the V+ error messages and their error codes.

Example

The following program segment displays an error message if an I/O error occurs:

READ (5) $input 	
IF IOSTAT(5) < 0 THEN 	
    TYPE "I/O error during read: ", $ERROR(IOSTAT(5))
    HALT 	
END 	

Related Keywords

ERROR real-valued function

IOSTAT real-valued function

REACTE program instruction


Submit comments to: techpubs@adept.com
Last modified on: 3/27/2012
Copyright © 1994 - 2012. Adept Technology, Inc.