home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / forth / 4028 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.0 KB  |  49 lines

  1. Newsgroups: comp.lang.forth
  2. Path: sparky!uunet!gumby!destroyer!news.iastate.edu!bible
  3. From: bible@iastate.edu (Anthony E Bible)
  4. Subject: Using other-language libraries from Forth
  5. Message-ID: <C1KyEu.HuA@news.iastate.edu>
  6. Sender: news@news.iastate.edu (USENET News System)
  7. Organization: Iowa State University, Ames, IA
  8. Date: Thu, 28 Jan 1993 20:04:04 GMT
  9. Lines: 38
  10.  
  11.     I'd like to see a thread started on using Forth in 
  12. conjunction with other languages.  More specifically I'd 
  13. like to know how Forth programmers could use library 
  14. facilities from another language in their programs.  I 
  15. assume it is not too difficult to write a code word to 
  16. access operating system services in most cases, but linking 
  17. library routines into a program seems to me rather more 
  18. difficult.
  19.     I think I recently saw mention of someone who compiles 
  20. a stub program using another language to get the library 
  21. member loaded and then somehow links that into the Forth 
  22. program.  I am thinking more along the lines of something 
  23. that could be done "seamlessly" in Forth itself, something 
  24. like a word 
  25.  
  26. EXTERN: <forth-word-name>
  27.         <library-info> <library-member> ;
  28.  
  29. and this would load the library member, resolving additional 
  30. references, into the Forth dictionary.
  31.     Obviously I don't much care whether or not it's called 
  32. EXTERN: and obviously there are other issues to consider 
  33. such as parameter passing and -- well, that's the kind of 
  34. thing I would like to see discussed.  What are the 
  35. considerations for implementing a capability like this?  If 
  36. it has already been done then I apologize for (yet again) 
  37. displaying my ignorance, and perhaps someone could summarize 
  38. how it was implemented and on what operating systems.
  39.  
  40. One minor request: although I don't want to try to control 
  41. what anyone has to say on this subject (as if I could! :) I 
  42. am not really interested in discussions of whether or not I 
  43. should want to do this.  This thread is just directed toward 
  44. people who have-to/want-to use Forth within a "typical" 
  45. operating system environment.  No offense meant nor implied.
  46.  
  47. Regards,
  48. tony
  49.