home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.internals
- Path: sparky!uunet!spool.mu.edu!yale.edu!jvnc.net!newsserver.jvnc.net!news.edu.tw!cc.ntnu.edu.tw!news!news.csie.nctu.edu.tw!cp78065
- From: cp78065@csie.nctu.edu.tw (Ji-Tzay Yang)
- Subject: Re: Question about longjmp ()
- Message-ID: <1993Jan9.124323.13018@csie.nctu.edu.tw>
- Sender: usenet@csie.nctu.edu.tw
- Organization: Computer Science & Information Engin., Chiao-Tung U, Taiwan, ROC
- X-Newsreader: TIN [version 1.1 PL6]
- References: <C0JpMo.1rGr@austin.ibm.com>
- Date: Sat, 9 Jan 1993 12:43:23 GMT
- Lines: 32
-
- Sivarama Subramanian (subra@bynar.austin.ibm.com) wrote:
- : Hi folks,
- : I have the following code segment.
- : main ()
- : {
- : int i = 0;
- : jmp_buf buf;
- : setjmp (buf);
- : printf ("%d\n", i);
- : if ( i == 1 )
- : exit;
- : i = 1;
- : longjmp (buf, 1);
- : }
- : My question is, should the value of i change or not.
-
- After running the program, the value 'i' is changed, and it should be
- changed.
-
- But is there any consideration for 'i' to keep its orignal value?
-
-
- --
- With regard,
-
- ============================================================================
- Ji-Tzay Yang (╖¿ ░≥ ╕ⁿ) | E-mail : cp78065@csie.nctu.edu.tw
- Dept. of Comp. Science & Info. Eng. | u7817065@cc.nctu.edu.tw
- National Chiao-Tung University | Tel : 886-35-712121 ext 6430
- Hsin-Chu, Taiwan ROC | Fax : 886-35-721486
- ============================================================================
-
-