home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / atari / st / tech / 4461 < prev    next >
Encoding:
Text File  |  1992-08-18  |  1.6 KB  |  45 lines

  1. Newsgroups: comp.sys.atari.st.tech
  2. Path: sparky!uunet!usc!wupost!darwin.sura.net!Sirius.dfn.de!math.fu-berlin.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!stepsun.uni-kl.de!uklirb!posthorn!vier!neuhaus
  3. From: neuhaus@vier.informatik.uni-kl.de (Stephan Neuhaus (HiWi Mattern))
  4. Subject: Re: Using Setexec() [a bit of help needed]
  5. Message-ID: <neuhaus.714133626@vier>
  6. Keywords: Setexec(), BIOS, vectors, AAARRRGGGGHHHH!
  7. Sender: news@posthorn.informatik.uni-kl.de (News system account)
  8. Nntp-Posting-Host: vier.informatik.uni-kl.de
  9. Organization: University of Kaiserslautern, Germany
  10. References: <1992Aug17.083005.6390@aber.ac.uk> <1992Aug17.175736.7804@pbhya.PacBell.COM>
  11. Date: Tue, 18 Aug 1992 10:27:06 GMT
  12. Lines: 31
  13.  
  14. dbsuthe@pbhya.PacBell.COM (Daniel B. Suthers) writes:
  15.  
  16. >The following code should compile and execute under any C compiler.
  17. >[some program text deleted]
  18.  
  19. >   void (*jumpto)();
  20. >   void sec_on();
  21.  
  22. >   jumpto = sec_on;
  23. >   jumpto();
  24.  
  25. Just nit-picking, but it will only work with ANSI C compilers (as
  26. opposed to `any' C compiler).  For K&R C, you'd have to write
  27.  
  28.     (*jumpto)();
  29.  
  30. Furthermore, to make the thing bullet-proof, you could declare jumpto as
  31.  
  32.     void (*jumpto) (void);
  33.  
  34. >This is standard C stuff.
  35.  
  36. Yes, but not every C compiler understands standard (= ANSI) C.  As I
  37. said before, I was just nit-picking, and this is not a flame.
  38.  
  39. Have fun.
  40. -- 
  41. +------- No .sig? OH, COME ON! --------+-"The derivative snuggles  close to-+
  42. | email:  neuhaus@informatik.uni-kl.de | the function---whatever to snuggle |
  43. | snail mail: Stephan Neuhaus/Hilgard- | means; I'm too old for that"       |
  44. | ring 32/6750 Kaiserslautern/Germany  |                       -- Math Prof |
  45.