home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp48 / 5655 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.2 KB  |  36 lines

  1. Newsgroups: comp.sys.hp48
  2. Path: sparky!uunet!tcsi.com!iat.holonet.net!brianw
  3. From: brianw@iat.holonet.net (Brian Walsh)
  4. Subject: Re: Passing Functions as Parameters
  5. Message-ID: <BxHp7z.LML@iat.holonet.net>
  6. Organization: HoloNet (BBS: 510-704-1058)
  7. References: <6596@dciem.dciem.dnd.ca>
  8. Distribution: na
  9. Date: Tue, 10 Nov 1992 07:38:22 GMT
  10. Lines: 24
  11.  
  12. jorchard@dciem.dciem.dnd.ca (Jeff Orchard) writes:
  13. : I would like to be able to put 'F' in level 1 and then execute the
  14. : program.  I DON'T want to have to put 'F(X)' on the stack... because that
  15. : would force me to integrate with respect to X.  It would be nice if
  16. : I could integrate with respect to a local variable.
  17. : OR... my problems would be solved if I could change this... "F(X)"
  18. : to this... 'F(X)'
  19.  
  20. Use APPLY:
  21. 1) { X } 'F' APPLY  ==> 'F(X)'
  22. 2) { Y Z } 'G' APPLY ==> 'G(Y,Z)'
  23.  
  24. Then EVAL, etc.  The quick reference guide lists the input arguments in 
  25. incorrect order.
  26.  
  27. "F(X)" OBJ-> doesn't work and results in an error, and using #5B15h 
  28. SYSEVAL to create a name from a string is also wrong.  You want to create 
  29. an symbolic expression, not a global variable name, and their structures 
  30. are entirely different.  APPLY's raison d'etre.
  31.  
  32. -- Brian Walsh
  33.    brianw@holonet.net
  34.  
  35.