Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucselx!bionet!agate!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM Newsgroups: comp.lang.forth Subject: Forth calls C Message-ID: <9102151415.AA00889@ucbvax.Berkeley.EDU> Date: 14 Feb 91 22:13:30 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: wmb%MITCH.ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Organization: The Internet Lines: 28 > There is one way I could agree to shrinking the ANSI wordset > thereby eliminating all of these controversies over the string or file > or ... wordsets. Define a standard way of calling C functions from > forth. Then anyone could use all the functions in libc.a or any other C > library and not need to reinvent the wheel (or words) in forth. > Think about it, interface to C in an standard sequence and all the > issues of strings, files, floating point, networking, GUI are > mostly solved. Use the C names, with the C specified arguments in a > forth context. real easy. But I figure this will never fly because > the forth hackers of the world have their egos too wrapped up > in reinventing the wheel in the forth way to get any real work done > and make money using forth. Many of my Forth products have this capability, but it is a major-league support headache. The problem is the diversity of calling conventions and linker formats across different machines, across different C implementations on the same machine, and even across different sets of system routines supplied by the system vendor. For instance, the Atari ST has about 5 different system interface levels, each with different calling conventions, not to mention the 3 or 4 different C compilers that have been popular at various times in the machines lifetime. Even OS-9, which is in general a very well-designed operating system, has about 4 or 5 different linkage mechanisms for various system interface components. Mitch Bradley, wmb@Eng.Sun.COM