Comment #7 on issue 1487 by Toon.Verstraelen: fcode: print sympy expressions as Fortran code http://code.google.com/p/sympy/issues/detail?id=1487
Ok, what about this: an FCodePrinter and a StrictFCodePrinter FCodePrinter: geared towards fcode function and copy past usage. - Never raises an exception and always tries to print something sensible. - Add temporary variables and PARAMETER/DATA statements in an ad hoc style - assignto feature - user_functions feature - support for indentation and line wrapping StrictFCodePrinter: geared towards codegen and derived from FCodePrinter - Introduces exceptions for everything that is not compilable in the practical sense. It is not sufficient that something is compilable in theory, are after manual editing. - In addition to the string output, a data structure is returned with additional instructuctions for codegen to add PARAMETER/DATA statements and variable definitions in the right place. - codegen will no longer call fcode, but will work with an instance of StrictFCodePrinter We can do similar things in ccode.py. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to sympy-issues@googlegroups.com To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---