SETER(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

✨ SETER ✨

okay so bestie, welcome to the NCAR Graphics manual page for SETER πŸŽ€ β€” the little routine your fav NCAR Graphics functions scream into when something goes wrong. no cap, this one's kind of the drama queen of error handling and we're obsessed. πŸ’…


🌸 NAME 🌸

SETER β€” the routine that NCAR Graphics routines call when errors occur. fr fr, that's literally its whole job. πŸ¦‹


✨ SYNOPSIS ✨

CALL SETER(MESSG,NERRF,ILEVL)

πŸ’– C-BINDING SYNOPSIS πŸ’–

#include <ncarg/ncargC.h>

void c_seter(char *messg, int nerrf, int ilevl)

🫢 DESCRIPTION 🫢

so here's the tea: that FORTRAN statement

CALL SETER (MESSG,NERRF,ILEVL)

is how you tell the error-handling package that an error has occurred. and bestie, what actually goes down after that call is NOT just about the arguments β€” it also depends on two internal variables, iykyk:

  • the error flag β€” says whether or not there was a prior error πŸ’€
  • the recovery-mode flag β€” says whether or not recovery mode is in effect 🌈

so let's break down every possible vibe:

  • If the internal error flag is 0 (no prior error) and the internal recovery-mode flag is 2 (recovery mode not set, which is the default), SETER prints the error message MESSG, calls FDUM if and only if ILEVL = 2, and then STOPs. 😭
  • If the internal error flag is 0 (no prior error) and the internal recovery-mode flag is 1 (recovery mode set), then what happens depends on the value of ILEVL: if ILEVL = 2 (fatal error), SETER prints the error message MESSG, calls FDUM, and STOPs, but, if ILEVL = 1 (recoverable error), SETER resets the internal error flag equal to NERRF, remembers the error message MESSG, and RETURNs. in the latter case, the user is expected to detect the fact that an error has occurred, take the necessary remedial action, and call ERROF to turn the internal error flag off. πŸ‘‘
  • If the internal error flag is non-zero (prior error), then the value of the internal recovery-mode flag will be 1 (recovery mode set); in this case, it doesn't make any difference what the value of ILEVL is: SETER prints both the remembered error message from the prior error and the new error message from MESSG, calls FDUM, and STOPs. πŸ’€πŸ’€

and now, the arguments of SETER, one by one:

  • MESSG β€” (an input variable or constant of type CHARACTER) is an error message describing the error that has occurred. This should be of the form "XXXXXX - TEXT DESCRIBING THE ERROR", where "XXXXXX" is the name of the routine in which the error occurred, and it should not be more than 113 characters long. yes, 113, that's the number, don't @ me. πŸ’…
  • NERRF β€” (an input expression of type INTEGER) is a non-zero error number in the range from -999 to +9999. πŸ”₯
  • ILEVL β€” (an input expression of type INTEGER) is the "error level" β€” either a 1 or a 2, implying that the error described by MESSG and NERRF is recoverable or fatal, respectively. ⭐

🧚 C-BINDING DESCRIPTION 🧚

the C-binding argument descriptions are the same as the FORTRAN argument descriptions. same energy, different language, slay. πŸ’œ


πŸ“ EXAMPLES πŸ“

use the ncargex command to see the following relevant examples: tseter, arex02. go look at them, they're iconic. ✨


πŸ’… ACCESS πŸ’…

to use SETER or c_seter, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. πŸŽ€


πŸ¦‹ SEE ALSO πŸ¦‹

  • Online: entsr, eprin, errof, error_handling, fdum, icfell, icloem, nerro, retsr, semess, ncarg_cbind

Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.

and that's the whole page bestie!! 🌸 this was the UNIX version of the SETER(3NCARG) page, dated March 1994 β€” yeah, she's vintage, and she ate. πŸ’– periodt. ✨🫢

πŸ“¦ where this page comes from