MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Transfering Packages Between Platforms and InputForm Conversions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42249] Transfering Packages Between Platforms and InputForm Conversions
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 25 Jun 2003 01:53:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

MathGroup,

A week or so ago I asked Mac owners to help test several of my packages
written in Windows. I had had problems with several users not being able to
evaluate a package or notebook correctly on a Mac without errors although
they worked fine on Windows systems. A number of MathGroup participants were
kind enough to test. I thank them all.

One Mac person got no errors at all on one computer. Most Mac people got
fleeting warning messages (they came and went with hardly time to read them)
about Contexts but then everything evaluated properly. There is still one
Mac person who it won't evaluated for, but he is working with 4.0. When I
isolated the offending statement and converted it to InputForm, the fleeting
messages went away.

So I am still not certain as to the best method to write normal Mathematica
packages that will be platform independent. I think the WRI claim of
platform independence is not strictly true.

In any case, in some of my packages I starting going through to change all
the cells to InputForm. But then I discovered a very bad feature in doing
these conversions. If you name a variable Global`t, say, Mathematica throws
the Global` away! I think this is an outright bug. Sometimes, in a package,
I want to use a Global variable, for example if I am returning a
parametrization. (I always have it as an optional argument and allow the
user to supply another symbol if he wishes.) So Mathematica should not be
stripping contexts off symbols when converting to InputForm.

Another annoying feature of converting between Forms is that all comments
are stripped away. I think that some internal commenting in code can be very
useful. But now I've gotten into the habit of not using internal comments
because I know that sooner or later I'll do a conversion between forms and
Mathematica will throw it away. I think that comments should be retained and
considered a normal part of InputForm.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/





  • Prev by Date: Re: Compile Module w/ Function inside?
  • Next by Date: Re: Mathlink newbie question
  • Previous by thread: MathOptimizer Professional software announcement
  • Next by thread: Re: Transfering Packages Between Platforms and InputForm Conversions