Specifications

;endif
ldd
outpt
jmp
fputnl
outpt rmb
2
resvd
rmb
2
busy rmb 2
type rmb
1
Always use this line.
Ditto
ieee fee "ieee4"
feb 0 ; No, we aren't careless— the double %n%n in the
; prompt below double spaces the screen lines.
instr feb 12
fee ''UDUMP loaded. To use: press PF7, then one of keys below.Jn%n"
fee "To disk: 'd'| to ieee4: 'i'i to printer: 'p'| to serial: 's'%n%n"
feb 0
end
<c k x x x x x x x x x x x x x x x x x x x x x x x x x x x x x >o <x x x x x x x x x x x x x x x x x x x x x x x x >
PROBLEMS IN MPASCAL AND MFORTRAN Thomas K. Roney teaches at Kent School, Kent
Crashes in Recursion and CT, 06757, and asked why SuperPET crashed in
Errors in Large Numeric Values lengthy recursions and why a factor of ten
was missing in large floating-point decimal
displays. We asked Bob Davis, Associate Editor in mPASCAL, to look into it, and
he did. His reply to Mr. Roney is printed below:
"By the way, I've discovered that the floating decimal point display bug exists
in mFORTRAN also! Recursing functions can be nested 10 deep and recursing pro
cedures can be nested 16 deep without a problem in microPASCAL. And, yes, Super
PET does go into rigor mortis (catatonia?) beyond these limits without any error
message. You may avoid the problem only with a software solution— write the re
cursing program to tally the calls; if the maximum is'reached, provide an error
message and prevent further recursion.
"I find that numbers up to but not including 1000000000.0 (0.1E+10) are display
ed correctly in floating decimal format. If there are no more than nine digits
to the left of the decimal point, the display will be correct. However, any lar
ger number will be displayed a factor of ten less than it should be in floating
decimal point format, as you discovered. Again, you must provide a software sol
ution. In mPASCAL, this might be: if value < 0.1E+10 then writeln (value :15:3)
else writeln (value * 10.0:15:3).
"MicroPASCAL will accept floating decimal point input correctly up to 1 followed
by 37 zeros, a decimal point, and a zero! Beyond this, you receive an error mes
sage, "Warning;line nn: Real number overflow" and the program continues although
the value of the variable is garbage. Also, the maximum field width for a float
ing decimal point display is 20. Neither of these limitations should normally be
a problem, however.
"Out of curiosity, I tried mFORTRAN using Example 27 from the tutorial disk to
see if the decimal shift bug is unique to mPASCAL or is general to the Waterloo
system. I find that the same decimal point shift occurs using the corresponding
format; i.e., mFORTRAN's 'print f15.3,r', which is equivalent to your example in
mPASCAL of 'writeln (r:15:3)'. You should warn your mFORTRAN students of this
and have them program a software solution.
SuperpPET Gazette, Vol.I No.11
-169-
December 1983/January 1984