Next: , Previous: , Up: Gentran   [Contents][Index]

61.3 Gentran Mode Switches

Option variable: fortran
Option variable: ratfor
Option variable: c

Default: off

These mode switches change the default mode of Maxima from evaluation to translation. They can be turned on and off with the gentran commands gentran_on and gentran_off. Each time a new Maxima session is started up, the system is in evaluation mode. It prints a prompt on the user’s terminal screen and waits for an expression or statement to be entered. It then proceeds to evaluate the expression, prints a new prompt, and waits for the user to enter another expression or statement. This mode can be changed to translation mode by turning on either the fortran, ratfor or c switches. After one of these switches is turned on and until it is turned off, every expression or statement entered by the user is translated into the corresponding language just as if it had been given as an argument to the gentran command. Each of the special functions that can be used from within a call to gentran can be used at the top level until the switch is turned off.

Option variable: gendecs

Default: on

When the gendecs switch is turned on, gentran generates type declarations whenever possible. When gendecs is switched off, type declarations are not generated. Instead, type information is stored in gentran’s symbol table but is not retrieved in the form of declarations unless and until either the gendecs command is called or the gendecs flag is switched back. Note: Generated declarations may often be placed in an inappropriate place (e.g. in the middle of executable fortran code). Therefore the gendecs flag is turned off during processing of templates by gentranin.


Next: , Previous: , Up: Gentran   [Contents][Index]