home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / internal / 2099 < prev    next >
Encoding:
Text File  |  1993-01-09  |  1.5 KB  |  45 lines

  1. Newsgroups: comp.unix.internals
  2. 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
  3. From: cp78065@csie.nctu.edu.tw (Ji-Tzay Yang)
  4. Subject: Re: Question about longjmp () 
  5. Message-ID: <1993Jan9.124323.13018@csie.nctu.edu.tw>
  6. Sender: usenet@csie.nctu.edu.tw
  7. Organization: Computer Science & Information Engin., Chiao-Tung U, Taiwan, ROC
  8. X-Newsreader: TIN [version 1.1 PL6]
  9. References: <C0JpMo.1rGr@austin.ibm.com>
  10. Date: Sat, 9 Jan 1993 12:43:23 GMT
  11. Lines: 32
  12.  
  13. Sivarama Subramanian (subra@bynar.austin.ibm.com) wrote:
  14. : Hi folks,
  15. :     I have the following code segment.
  16. :     main ()
  17. :     {
  18. :         int i = 0;
  19. :         jmp_buf buf;
  20. :         setjmp (buf);
  21. :         printf ("%d\n", i);
  22. :         if ( i == 1 )
  23. :             exit;
  24. :         i = 1;
  25. :         longjmp (buf, 1);
  26. :     }
  27. :     My question is, should the value of i change or not.
  28.  
  29.   After running the program, the value 'i' is changed, and it should be
  30.   changed.
  31.  
  32.   But is there any consideration for 'i' to keep its orignal value?
  33.  
  34.  
  35. --
  36.                                          With regard,
  37.  
  38.  ============================================================================
  39.  Ji-Tzay Yang (╖¿ ░≥ ╕ⁿ)              |  E-mail : cp78065@csie.nctu.edu.tw
  40.  Dept. of Comp. Science & Info. Eng.  |           u7817065@cc.nctu.edu.tw 
  41.  National Chiao-Tung University       |  Tel    : 886-35-712121 ext 6430 
  42.  Hsin-Chu, Taiwan ROC                 |  Fax    : 886-35-721486 
  43.  ============================================================================
  44.  
  45.