MPW Data Exchange
Volume Number: 6
Issue Number: 7
Column Tag: Programmer's Forum
By John Calley, Columbia, MO
Multilingual MPW Programming
[John Calley works with Project BioQUEST, a grant funded by the
Annenberg/CPB foundation, on educational simulations in biology for the Macintosh.
His current projects are a Modula II based programmer’s toolkit for use by other
BioQUEST programmers, and two instructional simulations in microbial genetics and
mendelian genetics.]
One of the exciting things about the MPW environment is its standard object code
format and standard linker that allows a single application to be written in several
different source languages. Almost every MPW language offers greater or lesser
support for this to the extent of allowing one to call procedures written in other MPW
languages. Sometimes, however, this is not enough. In some cases you need to be able
to access data declared by another language. In this article I would like to show how this
can be done for a couple of pairs of MPW languages and in the process show you the
techniques that will, I hope, allow you to do the same for your particular set of
languages.
This problem arose for BioQUEST when we needed to use a commercially available
graphing package (GrafPak from Invention Software) which is written in MPW Pascal.
We work in Modula II, which has a parameter passing mechanism very similar to that
of Pascal, so we did not anticipate any problems. We did have very few problems with