From: Francis Russell Date: Sun, 20 May 2012 13:54:16 +0000 (+0100) Subject: Generate "implicit none" in function. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=4f5ed66075254f4afccb2a147744d66b822ced45;p=francis%2Fofc.git Generate "implicit none" in function. --- diff --git a/src/ofc/codegen/FortranGenerator.scala b/src/ofc/codegen/FortranGenerator.scala index b65eb94..8c65407 100644 --- a/src/ofc/codegen/FortranGenerator.scala +++ b/src/ofc/codegen/FortranGenerator.scala @@ -139,9 +139,10 @@ class FortranGenerator { processStatement(func.getBlock) prependLine("\n") prependLines(symbolManager.getDeclarations) + prependLine("implicit none") out - // parameters are only named after processing the body + // parameters are only named *after* processing the body val paramNames = func.getParameters.map(symbolManager.getName(_)) val (header, footer) = func.getReturnType match { case (_: VoidType) => { @@ -346,5 +347,4 @@ class FortranGenerator { for(line <- lines.reverse) prependLine(line) } - }