translate_file terminates with a misleading error message while
attempting to translate the file
--start of file -----------------
my_apply(f,x) := f(x);
--end of file -------------------
(my_apply is a silly function; nevertheless, translate_file
should handle it more gracefully.) The source of the error may
be related to the warning Maxima gives while translating my_apply.
Specifically, here is what happened:
GCL (GNU Common Lisp) Version(2.4.0) Sat Jul 6 12:35:43 CDT 2002
Licensed under GNU Library General Public License
Contains Enhancements by W. Schelter
Maxima 5.6 Sat Jul 6 12:35:40 CDT 2002 (with enhancements by W. Schelter).
Licensed under the GNU Public License (see file COPYING)
(C1) system("cat try.mac")$
my_apply(f, x) := f(x);
(C2) translate_file("try.mac");
Translation begun on #ptry.mac.
Error: (#<output stream "try.UNLISP">) is not of type STREAM.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by TR-TELL.
Broken at TR-TELL. Type :H for Help.
MAXIMA>>:q
(C3) load("try.mac")$
/* Translating my_apply gives a warning. */
(C4) translate(my_apply);
f
in the form f(x)
has been used as a function, yet is a bound variable
in this context. This code being translated as :APPLY(f,[x])
(D4) [my_apply]
(C5)
Barton
Logged In: YES
user_id=28849
Patch from Fedor Bezrukov applied on 2002/06/10.
Essentially the same patch as given by Barton Willis.