translate SciMax Toolbox transparent

SciMax Toolbox >> translate_file

translate_file

Maxima Function

Calling Sequence

translate_file (maxima_filename)
translate_file(maxima_filename,lisp_filename)

Description

Translates a file of Maxima code into a file of Lisp code. translate_file returns a list of three filenames: the name of the Maxima file, the name of the Lisp file, and the name of file containing additional information about the translation. translate_file evaluates its arguments.

translate_file ("foo.mac"); load("foo.LISP") is the same as batch ("foo.mac") except for certain restrictions, the use of '@w' and %, for example.

translate_file (maxima_filename) translates a Maxima file maxima_filename into a similarly-named Lisp file. For example, foo.mac is translated into foo.LISP. The Maxima filename may include a directory name or names, in which case the Lisp output file is written to the same directory from which the Maxima input comes.

translate_file (maxima_filename, lisp_filename) translates a Maxima file maxima_filename into a Lisp file lisp_filename. translate_file ignores the filename extension, if any, of lisp_filename; the filename extension of the Lisp output file is always LISP. The Lisp filename may include a directory name or names, in which case the Lisp output file is written to the specified directory.

translate_file also writes a file of translator warning messages of various degrees of severity. The filename extension of this file is UNLISP. This file may contain valuable information, though possibly obscure, for tracking down bugs in translated code. The UNLISP file is always written to the same directory from which the Maxima input comes.

translate_file emits Lisp code which causes some declarations and definitions to take effect as soon as the Lisp code is compiled. See for more on this topic.

See also ,

tr_bound_function_applyp,

tr_exponent, tr_file_tty_messagesp, tr_float_can_branch_complex, tr_function_call_default, tr_numer, tr_optimize_max_loop, tr_semicompile, tr_state_vars, tr_warnings_get, tr_warn_bad_function_calls, tr_warn_fexpr, tr_warn_meval, tr_warn_mode, tr_warn_undeclared, tr_warn_undefined_variable, and tr_windy.

translate SciMax Toolbox transparent