History


Format.m: C, FORTRAN77, Maple and TeX Code Generation Package

This package extends Mathematica's built-in format rules. Assignments to expressions and lists are now possible. The package adds definitions Assign, CAssign and FortranAssign and MapleAssign. Many shortcomings of the built-in formatting code have also been addressed, such as the limit on continuation lines in FORTRAN77 and assignments to Expressions. Code optimization is possible via the auxiliary function Experimental`OptimizeExpression and the option AssignOptimize. The options of Experimental`OptimizeExpression, such as OptimizationLevel, can also be passed to the Assign functions. The functions are primarily intended for use with the Splice command. When using Splice, the option FormatType->OutputForm should be specified. Interactive output within a Mathematica session is also possible (see also the AssignToFile option). All expressions are written as Strings. This enable more precise formatting of expressions, removing the need for text editing. Any Mathematica print form (e.g. TeXForm) can be specified as an argument of the Assign command.

Usage examples

Submitted March 14, 2016 interoperability fortran tex c formatting published


Format.m: C, FORTRAN77, Maple and TeX Code Generation Package

This package extends Mathematica's built-in format rules. Assignments to expressions and lists are now possible. The package adds definitions Assign, CAssign and FortranAssign and MapleAssign. Many shortcomings of the built-in formatting code have also been addressed, such as the limit on continuation lines in FORTRAN77 and assignments to Expressions. Code optimization is possible via the auxiliary function Experimental`OptimizeExpression and the option AssignOptimize. The options of Experimental`OptimizeExpression, such as OptimizationLevel, can also be passed to the Assign functions. The functions are primarily intended for use with the Splice command. When using Splice, the option FormatType->OutputForm should be specified. Interactive output within a Mathematica session is also possible (see also the AssignToFile option). All expressions are written as Strings. This enable more precise formatting of expressions, removing the need for text editing. Any Mathematica print form (e.g. TeXForm) can be specified as an argument of the Assign command.

Submitted March 14, 2016 interoperability fortran tex c formatting superseded