fix for bug report # 649934 (Elseif prints incorrectly)
Subject: fix for bug report # 649934 (Elseif prints incorrectly)
From: Robert Dodier
Date: Wed, 27 Jul 2005 20:38:11 -0600
Hello,
I have committed a fix for bug report # 649934 (Elseif prints incorrectly).
As noted in the bug report, if -- then -- elseif parses correctly,
but is not displayed correctly. I have modified src/displa.lisp and
src/grind.lisp to display if -- then -- elseif.
The modified functions also display if -- then -- else and if -- then
conditionals. However, I have attempted to ensure that conditionals
other than if -- then -- elseif are displayed in exactly the same way
as they were before this modification.
I mention it here since it is larger than the minor changes I usually make.
All the best,
Robert Dodier
PS. Here is the commit log message:
--------------------------------------------------
Modify display code so that if -- then -- elseif is displayed correctly.
This fixes SF bug report # 649934. No changes to parser (elseif parses
correctly) or evaluation code.
- src/displa.lisp: modify DIM-MCOND (called when display2d is true)
- src/grind.lisp: modify MSZ-MCOND (called when display2d is false,
and by the functions string and grind)
- tests/rtestmcond_display.mac: new file, with input & expected result
(however, didn't put it on the list of files in tests/testsuite.lisp)
- tests/mcond_display_elseif.mac: new file, list of if -- then --
elseif examples
- tests/mcond_display_elseif.out: new file, expected output of
mcond_display_elseif.mac
Tested on Maxima 5.9.1cvs on gcl 2.6.6 and clisp 2.33.1 (both Linux).
- run_testsuite reports no unexpected errors
- batch ("tests/rtestmcond_display.mac", test)
reports no errors (this test compares string output,
which is formatted via MSZ-MCOND)
- batch ("tests/mcond_display_elseif.mac")
is the same (as determined by "diff") as tests/mcond_display_elseif.out
which was inspected to see that the output is correct
(2-dimensional console output is formatted via DIM-MCOND)
- batching several share files which contain if -- then -- else
shows that both DIM-MCOND (display2d: true) and MSZ-MCOND
(display2d: false) yield the same output, as determined by diff,
for if -- then -- else as before they were changed
(there are no share files which contain elseif)