Difference between revisions of "MESSAGE()"

From Lianjapedia
Jump to: navigation, search
 
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return last error encountered message
 
Function to return last error encountered message
 
  
 
==Syntax==
 
==Syntax==
 
MESSAGE([<expN>])
 
MESSAGE([<expN>])
 
  
 
==See Also==
 
==See Also==
[[ERRNO()]], [[ERROR()]], [[ON ERROR]]
+
[[ERRNO()]], [[ERROR()]]
 
+
  
 
==Description==
 
==Description==
 
The MESSAGE() function returns a character string describing the last error encountered.  The optional parameter <expN> must result in 1, and when used will cause MESSAGE() to return the last program line which caused an error.
 
The MESSAGE() function returns a character string describing the last error encountered.  The optional parameter <expN> must result in 1, and when used will cause MESSAGE() to return the last program line which caused an error.
 
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
set exclusive off
+
msg=message()
on error *
+
use payroll
+
if not used()
+
    msg=message()
+
    dialog box "&msg..  Press any key to continue."
+
endif
+
set exclusive on
+
 
</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:18, 4 February 2013

Purpose

Function to return last error encountered message

Syntax

MESSAGE([<expN>])

See Also

ERRNO(), ERROR()

Description

The MESSAGE() function returns a character string describing the last error encountered. The optional parameter <expN> must result in 1, and when used will cause MESSAGE() to return the last program line which caused an error.

Example

msg=message()