I'm *WAY* behind in email, but someone asked about the TRY-RECOVER macros
Eugene Volokh included in his "How Programming Languages Differ" paper (it's
more of a book).
By the way, you can read this paper at
http://www.adager.com/TechnicalPapers.html
Just for fun: A free copy of the FREEWARE tape for the first person to email
me the name of the the paper I wrote, quite a while ago, which is there
somewhere.
---cut here---
/* ---------------------------------------------------------------- */
/* Contents: try/escape/recover defines */
/* Author : Tim Chase / Eugene Volokh */
/* Comments: Error-handling mechanism */
/* (must #include <jmpbuf.h>) */
/* Usage : */
/* try */
/* statement; */
/* recover */
/* statement; */
/* */
/* escape(escapecode); */
/* ---------------------------------------------------------------- */
/* - global declarations ------------------------------------------ */
int escapecode;
int jump_stack_ptr = -1;
jmp_buf jump_stack[1000]; /* the stack used to do nesting */
#define try if (setjmp(jump_stack[++jump_stack_ptr])==0) {
#define recover jump_stack_ptr--; } else
#define escape(parm) \
{ \
escapecode = parm; \
longjmp(jump_stack[jump_stack_ptr--], 1); \
}
---
Michael D. Hensley | mailto:[log in to unmask]
Allegro Consultants Inc. |
408/252-2330 | Visit scenic http://www.allegro.com