PowerMac kernel eccentricity
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1809] PowerMac kernel eccentricity
- From: wmm at chem.wayne.edu (Martin McClain)
- Date: Thu, 17 Aug 1995 00:02:19 -0400
Dear mathgroupers- I recently received some excellent help from K. J. Paradise at mathsource concerning a weird feature of the PowerMac kernel. It is strange enough that I thought I should pass it along. The Problem I had a package that was fully debugged on the PowerMac, but when I ran it on a Sun kernel, the usage messages looked all jammed together. It seemed that the Sun kernel was ignoring the "return" symbols \r that I used to control carriage returns. Advice from Paradise "...this issue has come up a couple of times in different places. The PowerMacintosh native version of Mathematica handles \r and \n differently from other versions of Mathematica... ." Where the PowerMac uses \r (return), all other kernels use \n (newline). The Fix In the package script, just above BeginPackage, I wrote PowerMacQ = $Version=="Power Macintosh 2.2 (February 24, 1994)"; toPowerMacStyle[s_String]:=StringReplace[s, "\n"->"\r"]; If[PowerMacQ,$PreRead=toPowerMacStyle]; BeginPackage["JonesCalculus`"]; ********package here********* End; EndPackage; $PreRead=.; This seems basically to solve the problem, and it is invisible to the user. But if WRI continues to make print variants in the kernels on different machines, this stuff could get out of hand.