[comp.sys.mac.programmer] MacsBug makes my code live!?

mandel@vax.anes.tulane.edu (Jeff E Mandel MD MS) (01/30/91)

This is so strange I had to share it. One of my residents wrote an XCMD in
Think Pascal (v 2.0.3) to do some futzy thing, which it appeared to do
flawlessly. I suggested another feature that would make it do even more futzy
things, but rather than requiring 4 parameters (mode plus the IDs of 3 fields)
required only 2 parameters (mode plus the ID of one field). He implemented it,
and it worked just fine, until we put it on a machine which did not have
MacsBug installed, then the bomb (Error 11, Misc error). We tracked down the
problem; his code didn't check for the number of parameters, and was doing
ZeroToPas and StringToNum on a nonexistant parameter. Checking for parameters
before converting them solved the problem, but left me mystified. How can
something generate an exception without MacsBug but not with MacsBug. As far as
I can tell, MacsBug is not "falling on the bit bomb". OK people, impress me
with your erudition.

Jeff E Mandel MD MS
Asst Professor of Anesthesiology
Tulane University School of Medicine
New Orleans, LA