1 C$Procedure PRTPKG ( Declare Arguments for Error Message Routines )
3 LOGICAL FUNCTION PRTPKG ( SHORT, LONG, EXPL, TRACE, DFAULT, TYPE )
7 C Declare the arguments for the error message selection entry
8 C points. DO NOT CALL THIS ROUTINE.
28 PARAMETER ( FILEN = 128 )
34 C -------- --- --------------------------------------------------
46 C See the ENTRY points for discussions of their arguments.
50 C See the ENTRY points for discussions of their arguments.
54 C See the ENTRY points for discussions of their parameters.
58 C This routine signals an error IF IT IS CALLED.
66 C DO NOT CALL THIS ROUTINE.
68 C The entry points declared in this routine are:
73 C There is no reason to call this subroutine.
74 C The purpose of this subroutine is to make the
75 C declarations required by the various entry points.
76 C This routine has no run-time function.
80 C None. DO NOT CALL THIS ROUTINE.
84 C DO NOT CALL THIS ROUTINE.
86 C$ Literature_References
90 C$ Author_and_Institution
96 C Comment section for permuted index source lines was added
97 C following the header.
113 C- Beta Version 1.0.1, 08-FEB-1989
115 C PRTPKG, though it performs no run-time function, must
116 C still return a value, in order to comply with the Fortran
117 C standard. So, now it does.
119 C- Beta Version 1.0.1, 08-FEB-1989
121 C Warnings added to discourage use of this routine.
122 C Parameter declarations moved to "Declarations" section.
123 C Two local declarations moved to the correct location.
138 CHARACTER*(FILEN) DEVICE
141 CHARACTER*(10) LOCTYP
161 DATA SVSHRT / .TRUE. /
162 DATA SVEXPL / .TRUE. /
163 DATA SVLONG / .TRUE. /
164 DATA SVTRAC / .TRUE. /
165 DATA SVDFLT / .TRUE. /
171 CALL GETDEV ( DEVICE )
173 CALL WRLINE ( DEVICE,
174 . 'PRTPKG: You have called an entry point which' //
175 . ' has no run-time function; this may indicate' //
176 . ' a program bug. Please check the PRTPKG' //
177 . ' documentation. ' )
179 CALL WRLINE ( DEVICE, 'SPICE(BOGUSENTRY)' )
190 C$Procedure SETPRT ( Store Error Message Types to be Output )
192 C ENTRY BOGUS (X, Y, Z)
194 ENTRY SETPRT ( SHORT, EXPL, LONG, TRACE, DFAULT )
198 C Store (a representation of) the selection of types of error
199 C messages to be output. DO NOT CALL THIS ROUTINE.
219 C VARIABLE I/O DESCRIPTION
220 C -------- --- --------------------------------------------------
222 C SHORT I Select output of short error message?
223 C EXPL I Select output of explanation of short message?
224 C LONG I Select output of long error message?
225 C TRACE I Select output of traceback?
226 C DFAULT I Select output of default message?
230 C SHORT indicates whether the short error message is selected
231 C as one of the error messages to be output when an error
232 C is detected. A value of .TRUE. indicates that the
233 C short error message IS selected.
235 C EXPL indicates whether the explanatory text for the short
236 C error message is selected as one of the error messages
237 C to be output when an error is detected. A value of
238 C .TRUE. indicates that the explanatory text for the
239 C short error message IS selected.
241 C LONG indicates whether the long error message is selected
242 C as one of the error messages to be output when an error
243 C is detected. A value of .TRUE. indicates that the
244 C long error message IS selected.
246 C TRACE indicates whether the traceback is selected
247 C as one of the error messages to be output when an error
248 C is detected. A value of .TRUE. indicates that the
249 C traceback IS selected.
251 C DFAULT indicates whether the default message is selected
252 C as one of the error messages to be output when an error
253 C is detected. A value of .TRUE. indicates that the
254 C default message IS selected.
275 C DO NOT CALL THIS ROUTINE.
277 C The effect of this routine is an ENVIRONMENTAL one. This
278 C routine performs no output; it stores the error message
279 C selection provided as input.
281 C Note that the actual output of error messages depends not
282 C only on the selection made using this routine, but also
283 C on the selection of the error output device (see ERRDEV)
284 C and the choice of error response action (see ERRACT). If
285 C the action is not 'IGNORE' (possible choices are
286 C 'IGNORE', 'ABORT', 'DEFAULT', 'REPORT', and 'RETURN'),
287 C the selected error messages will be written to the chosen
288 C output device when an error is detected.
292 C 1. In this example, the short and long messages are selected.
295 C C Select short and long error messages for output
296 C C (We don't examine the status returned because no
297 C C errors are detected by SETPRT):
300 C STATUS = SETPRT ( .TRUE., .FALSE., .TRUE., .FALSE.,
307 C DO NOT CALL THIS ROUTINE.
309 C$ Literature_References
313 C$ Author_and_Institution
332 C Warnings added to discourage use of this routine in
333 C non-error-handling code. Parameters section added.
382 C We assign a value to SETPRT, but this value is
393 C$Procedure MSGSEL ( Is This Message Type Selected for Output? )
395 ENTRY MSGSEL ( TYPE )
399 C Indicate whether the specified message type has been selected
416 C VARIABLE I/O DESCRIPTION
417 C -------- --- --------------------------------------------------
419 C TYPE I Type of message whose selection status is queried.
420 C FILEN P Maximum length of a file name.
422 C The function takes the value .TRUE. if the message type indicated
423 C by TYPE has been selected for output to the error output device.
428 C TYPE Refers to a type of error message. Possible values
429 C are 'SHORT', 'EXPLAIN', 'LONG', 'DEFAULT',
434 C The function takes the value .TRUE. if the message type indicated
435 C by TYPE has been selected for output to the error output device.
439 C FILEN is the maximum length of a file name.
443 C Additionally, invalid values of TYPE are detected.
445 C The short error message set in this case is:
446 C 'SPICE(INVALIDMSGTYPE)'
448 C The handling of this error is a special case; to avoid recursion
449 C problems, SIGERR is not called when the error is detected.
450 C Instead, the short and long error messages are output directly.
459 C This routine is part of the SPICELIB error handling mechanism.
461 C Note that even though a given type of message may have been
462 C selected for output, the output device and error response
463 C action must also have been selected appropriately.
464 C Use ERRDEV to choose the output device for error messages.
465 C Use ERRACT to choose the error response action. Any action
466 C other than 'IGNORE' will result in error messages being
467 C written to the error output device when errors are detected.
468 C See ERRACT for details.
473 C 1. We want to know if the short message has been selected
477 C C Test whether the short message has been selected:
480 C SELECT = MSGSEL ( 'SHORT' )
487 C$ Literature_References
491 C$ Author_and_Institution
509 C Parameters section added; parameter declaration added
510 C to brief I/O section as well.
520 CALL LJUST ( TYPE, LTYPE )
521 CALL UCASE ( LTYPE, LTYPE )
524 IF ( LTYPE .EQ. 'SHORT' ) THEN
528 ELSE IF ( LTYPE .EQ. 'EXPLAIN' ) THEN
532 ELSE IF ( LTYPE .EQ. 'LONG' ) THEN
536 ELSE IF ( LTYPE .EQ. 'TRACEBACK' ) THEN
540 ELSE IF ( LTYPE .EQ. 'DEFAULT' ) THEN
547 C Bad value of type! We have a special case here; to
548 C avoid recursion, we output the messages directly,
549 C rather than call SIGERR.
552 CALL GETDEV ( DEVICE )
554 CALL WRLINE ( DEVICE, 'SPICE(INVALIDMSGTYPE)' )
556 CALL WRLINE ( DEVICE, ' ' )
561 C Note: What looks like a typo below isn't; there's
562 C a line break after the substring 'specified' of
563 C the "word" 'specifiedwas'.
566 CALL WRLINE ( DEVICE,
568 . 'MSGSEL: An invalid error message type was supplied as' //
569 . ' input; the type specifiedwas: ' // LOCTYP
577 & intensity1(efv,fv,svin,svquad,sfpv,maxp,value,jndex,k,kj,jmod,isup)
579 character*(*) function foo()