home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / internal / 2098 < prev    next >
Encoding:
Text File  |  1993-01-08  |  720 b   |  31 lines

  1. Newsgroups: comp.unix.internals
  2. Path: sparky!uunet!cs.utexas.edu!geraldo.cc.utexas.edu!portal.austin.ibm.com!awdprime.austin.ibm.com!bynar.austin.ibm.com!subra
  3. From: subra@bynar.austin.ibm.com (Sivarama Subramanian)
  4. Subject: Question about longjmp () 
  5. Sender: news@austin.ibm.com (News id)
  6. Message-ID: <C0JpMo.1rGr@austin.ibm.com>
  7. Date: Fri, 8 Jan 1993 17:23:12 GMT
  8. Reply-To: subra@bynar.austin.ibm.com (Sivarama Subramanian)
  9. Organization: IBM Austin, TX
  10. Lines: 19
  11.  
  12. Hi folks,
  13.     I have the following code segment.
  14.     main ()
  15.     {
  16.         int i = 0;
  17.         jmp_buf buf;
  18.         setjmp (buf);
  19.         printf ("%d\n", i);
  20.         if ( i == 1 )
  21.             exit;
  22.         i = 1;
  23.         longjmp (buf, 1);
  24.     }
  25.     My question is, should the value of i change or not.
  26.  
  27. Thank you
  28.  
  29. subra
  30.  
  31.