home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / hypercar / 3423 < prev    next >
Encoding:
Text File  |  1992-09-13  |  1.1 KB  |  40 lines

  1. Newsgroups: comp.sys.mac.hypercard
  2. Path: sparky!uunet!cs.utexas.edu!asuvax!ennews!gtephx!patfieldk
  3. From: patfieldk@gtephx.UUCP (Kevin M. Patfield)
  4. Subject: Re: Message-passing question
  5. Message-ID: <1992Sep11.233513.15823@gtephx.UUCP>
  6. Organization: AG Communication Systems, Phoenix, AZ
  7. References: <gefDdzC00VokMNhUpJ@andrew.cmu.edu> <1992Sep9.213735.12782@leland.Stanford.EDU>
  8. Date: Fri, 11 Sep 1992 23:35:13 GMT
  9. Lines: 29
  10.  
  11. In article <1992Sep9.213735.12782@leland.Stanford.EDU> brod@jessica.stanford.edu (Brodie Lockard) writes:
  12. >
  13. >With functions, you'll run into the above problem.  Try using regular handlers
  14. >and returning values via globals:
  15.  
  16. It's not really obvious from anything I've read but "regular handlers" can
  17. return values just fine.  [My personal crusade is to write stacks without
  18. using globals whenever humanly possible.]
  19.  
  20. on foo
  21.   ...
  22.   ...
  23.   ...
  24.   return "bar"
  25. end foo
  26.  
  27.  
  28. on test
  29.   foo
  30.   get the result
  31.   if it is "bar"
  32.   then ...
  33.   else ...
  34. end test
  35. -- 
  36. Kevin Patfield, AG Communication Systems, Phoenix, AZ
  37. UUCP: {ncar!noao!enuucp | uunet!zardoz!hrc | att}!gtephx!patfieldk
  38. Internet: gtephx!patfieldk@enuucp.eas.asu.edu
  39. AOL: Patfield
  40.