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

61.4 Gentran Option Variables

Option variable: gentranlang

Default: fortran

Selects the target numerical language. Currently, gentranlang must be fortran, ratfor, or c. Note that symbols entered in Maxima are case-sensitive. gentranlang should not be set to FORTRAN, RATFOR or C.

Option variable: fortlinelen

default: 72

Maximum number of characters printed on each line of generated FORTRAN code.

Option variable: minfortlinelen

Default: 40

Minimum number of characters printed on each line of generated FORTRAN code.

Option variable: fortcurrind

Default: 0

Number of blank spaces printed at the beginning of each line of generated FORTRAN code (after column 6).

Option variable: ratlinelen

Default: 80

Maximum number of characters printed on each line of generated Ratfor code.

Option variable: clinelen

Default: 80

Maximum number of characters printed on each line of generated ’C’ code.

Option variable: minclinelen

Default: 40

Minimum number of characters printed on each line of generated ’C’ code.

Option variable: ccurind

Default: 0

Number of blank spaces printed at the beginning of each line of generated’C’ code.

Option variable: tablen

Default: 4

Number of blank spaces printed for each new level of indentation. (Automatic indentation can be turned off by setting this variable to 0.)

Option variable: genfloat

Default: false

When set to true (or any non-false value), causes integers in generated numerical code to be converted to floating point numbers, except in the following places: array subscripts, exponents, and initial, final, and step values in do-loops. An exception (for compatibility with Macsyma 2.4) is that numbers in exponentials (with base %e only) are double-floated even when genfloat is false.

Option variable: dblfloat

Default: false If dblfloat is set to true, floating point numbers in gentran output in implementations (such as Windows Maxima under CLISP) in which float and double-float are the same will be printed as *.d0. In implementations in which float and double-float are different, floats will be coerced to double-float before being printed.

Option variable: gentranseg

Default: true

Option variable: maxexpprintlen

Default: 800

When gentranseg is true (or any non-false value), causes Gentran to "segment" large expressions into subexpressions of manageable size. The segmentation facility generates a sequence of assignment statements, each of which assigns a subexpression to an automatically generated temporary variable name. This sequence is generated in such a way that temporary variables are re-used as soon as possible, thereby keeping the number of automatically generated variables to a minimum. The maximum allowable expression size can be controlled by setting the maxexpprintlen variable to the maximum number of characters allowed in an expression printed in the target numerical language (excluding spaces and other whitespace characters automatically printed by the formatter). When the segmentation routine generates temporary variables, it places type declarations in the symbol table for those variables if possible. It uses the following rules to determine their type:

1. If the type of the variable to which the large expression is being assigned is already known (i.e., has been declared by the user via a TYPE form), then the temporary variables will be declared to be of that same type. 2. If the global variable tempvartype has a non-false value, then the temporary variables are declared to be of that type. 3. Otherwise, the variables are not declared unless implicit has been set to true.

Option variable: gentranopt

Default: false

When set to true (or any non-false value), causes Gentran to replace each block of straightline code by an optimized sequence of assignments obtained from the Maxima optimize command. (The optimize command takes an expression and replaces common subexpressions by temporary variable names. It returns the resulting assignment statement, preceded by common-subexpression-to-temporary-variable assignments.

Option variable: tempvarname

Default: ’t

Name used as the prefix when generating temporary variable names.

Option variable: optimvarname

default: ’u

is the preface used to generate temporary file names produced by the optimizer when gentranopt is true. When both gentranseg and gentranopt are true, the optimizer generates temporary file names using optimvarname while the segmentation routine uses tempvarname preventing conflict.

Option variable: tempvarnum

Default: 0

Number appended onto tempvarname to create a temporary variable name. If the temporary variable name resulting from appending tempvarnum onto the end of tempvarname has already been generated and still holds a useful value or has a different type than requested, then the number is incremented until one is found that was not previously generated or does not still hold a significant value or a different type.

Option variable: tempvartype

Default: false

Target language variable type (e.g., INTEGER, REAL*8, FLOAT, etc.) used as a default for automatically generated variables whose type cannot be determined otherwise. If tempvartype is false, then generated temporary variables whose type cannot be determined are not automatically declared.

Option variable: implicit

Default: false

If implicit is set to true temporary variables are assigned their implicit type according to Fortran rules based on the initial letter of the name. If gendecs is on, this results in printed type declarations.

Option variable: gentranparser

Default: false

If gentranparser is set to true Maxima forms input to gentran will be parsed and an error will be produced if an expression cannot be translated. Otherwise, untranslatable expressions may generate anomalous output, sometimes containing explicit calls to Maxima functions.

Option variable: genstmtno

Default: 25000

Number used when a statement number must be generated. Note: it is the user’s responsibility to make sure this number will not clash with statement numbers in template files.

Option variable: genstmtincr

Default: 1

number by which genstmtno is incremented each time a new statement number is generated.

Option variable: usefortcomplex

Default: false

If usefortcomplex is true, real numbers in expressions declared to be complex by type(complex,…) will be printed in Fortran complex number format (realpart,0.0). This is a purely syntactic device and does not carry out any complex calculations.


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