home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12862 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1.7 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!usc!sol.ctr.columbia.edu!eff!news.byu.edu!news.mtholyoke.edu!nic.umass.edu!dime!barrett
  2. From: barrett@scooby.cs.umass.edu (Daniel Barrett)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: ARexx stem variables (records) vs. function return values?
  5. Message-ID: <52692@dime.cs.umass.edu>
  6. Date: 30 Aug 92 19:30:36 GMT
  7. Sender: news@dime.cs.umass.edu
  8. Reply-To: barrett@scooby.cs.umass.edu (Daniel Barrett)
  9. Organization: BLAZEMONGER INCORPORATED
  10. Lines: 32
  11.  
  12.  
  13.     Can an ARexx user-defined function return a stem variable?
  14. (What we humans usually call a "record" or "struct". :-))
  15.  
  16.     I want a function to fill in the fields of a stem variable,
  17. return the value, and assign it to another stem variable.  Like this:
  18.  
  19.     person. = ReturnStuff()
  20.     SAY person.firstname person.lastname
  21.     EXIT
  22.  
  23.     ReturnStuff: PROCEDURE
  24.         guy.name = "Harry"
  25.         guy.lastname = "Hosehead"
  26.         RETURN guy.
  27.  
  28. In this example, I'd like the "name" field of "person" to get filled in,
  29. so the program prints "Harry Hosehead".
  30.  
  31.     Is such a thing possible to do???  I'm wracking my brains trying
  32. to make it work, and the answer does not appear to be in any of my 3
  33. ARexx manuals.
  34.  
  35.     Please reply by e-mail, since our newsfeed is very slow at the
  36. moment.  THANKS!!!
  37.  
  38.                                                         Dan
  39.  
  40.  //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  41. | Dan Barrett -- Dept of Computer Science, Lederle Graduate Research Center |
  42. | University of Massachusetts, Amherst, MA  01003  --  barrett@cs.umass.edu |
  43.  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////
  44.