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