home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13186 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.5 KB  |  39 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!usc!cs.utexas.edu!tamsun.tamu.edu!bpb9204
  3. From: bpb9204@tamsun.tamu.edu (Brent)
  4. Subject: Re: Chapter 6 of Mac C Prog. Primer 2nd Ed.
  5. Message-ID: <1992Jul30.013107.13930@tamsun.tamu.edu>
  6. Followup-To: comp.sys.mac.programmer
  7. Keywords: REMINDER.c
  8. Sender: bpb9204@tamsun.tamu.edu
  9. Organization: Texas A&M Univ., Inc.
  10. References: <1992Jul29.200948.14146@ccu.umanitoba.ca>
  11. Date: Thu, 30 Jul 1992 01:31:07 GMT
  12. Lines: 25
  13.  
  14. umdenbo0@ccu.umanitoba.ca (David A. Denboer) writes:
  15. |reminder->notify.nmResp = &LaunchResponse;
  16. |
  17. |It gives me a pointer types don't match error for "&LaunchResponse"
  18. |
  19. |LaunchResponse is the function that I am using to post a notification
  20. |
  21. |Anyway, if you have had trouble with this, and gotten it to work, let me know
  22. |how you did it!!!
  23.  
  24. David, in C, a function name ONLY evaluates to the address of that
  25. function.  I.e., LaunchResponse gives an address but LaunchResponse()
  26. calls the function.  Taking the address of functions (&LaunchResponse)
  27. and of arrays (&char_array) doesn't really mean anything in C since
  28. these to names evaluate to an address/offset anyway.
  29.  
  30. Your code should simply be:  reminder->notify.nmResp = LaunchResponse;
  31.  
  32. Hope this helps.
  33. -Brent
  34. -- 
  35. +-------------------------+  Pale Terror trembling guards the fountain's head,
  36. |Brent P. Burton, N5VMG   |  And rouses Fancy on her wakeful bed;
  37. |bpb9204@tamsun.tamu.edu  |  From realms of viewless spirits tears the veil,
  38. +-------------------------+  And there reveals the unutterable tale. - M. Lewis
  39.