XERROR(MESSAGE, LENMESS, NERROR, LEVEL) XERRWV(MESSAGE, LENMESS, NERROR, LEVEL, NI, I1, I2, NR, R1, R2)
* - passed to S-PLUS warning queue **- passed once to S-PLUS warning queue Note that recover level messages are promoted to fatal when warn is 2 or -2. Also all output is supressed if warn is negative.
Netlib reference.
C examples from the XERROR prolog - offered as Fortran comments c call xerror('smooth -- num was zero.',23,1,2) c call xerror('integ -- less than full accuracy achieved.', c 1 43,2,1) c call xerror('rooter -- actual zero of f found before interval f c 1ully collapsed.',65,3,0) c call xerror('exp -- underflows being set to zero.',39,1,-1) C examples for XERRWV c call xerrwv('smooth -- num (=i1) was zero.',29,1,2, c 1 1,num,0,0,0.,0.) c call xerrwv('dodesl -- By T (r1) mxit (i1) steps taken without c 1reaching tfinal (r2)',70,3,1,mxit,0,2,sngl(t),sngl(tfinal)) c call xerrwv('quadxy -- requested error (r1) less than minimum ( c 1r2).',54,77,1,0,0,0,2,errreq,errmin)From the ddriv2 code from Netlib: CHARACTER*100 MSG .... C Fatal error if method flag, MINT, out of range IF (MINT .LT. 1 .OR. MINT .GT. 3) THEN MSG = 'DDRIV21FE Illegal input. Improper value for'// 1' the integration method flag, MINT (I1)' LMSG = len( 1'DDRIV21FE Illegal input. Improper value for'// 1' the integration method flag, MINT (I1)') CALL XERRWV(MSG,LMSG,21,2,1,MINT,0,0,0.0,0.0) RETURN END IF .... C Warn if more than maximum number of steps taken IF ((IWORK(INSTEP)-NSTEPL) .GT. MXSTEP) THEN MSG ='DDRIV33WRN At T (R1), MXSTEP (I1) steps have been taken' 1//' without reaching TOUT (R2).' LMSG = len( 1'DDRIV33WRN At T (R1), MXSTEP (I1) steps have been taken' 1//' without reaching TOUT (R2).') CALL XERRWV(MSG, LMSG, 3, 0, 1, MXSTEP, 0, 2, SNGL(T), 1 SNGL(TOUT)) NSTATE = 3 GO TO 560 END IF