Top
Back: eval
Forward: example
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.30 ERROR

Syntax:
ERROR ( string_expression )
Type:
none
Purpose:
Immediately interrupts the current computation, returns to the top-level, and displays the argument string_expression as error message.

Note:
This should be used as an emergency, resp. failure, exit within procedures.

Example:
 
int i=1;
proc myError() {ERROR("Need to leave now");i=2;}
myError();
==>    ? Need to leave now
==>    ? leaving ::myError (0)
i;
==> 1

Top Back: eval Forward: example FastBack: Functions and system variables FastForward: Control structures Up: Functions Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.4.0, 2024, generated by texi2html.