From 4f5ed66075254f4afccb2a147744d66b822ced45 Mon Sep 17 00:00:00 2001 From: Francis Russell Date: Sun, 20 May 2012 14:54:16 +0100 Subject: [PATCH] Generate "implicit none" in function. --- src/ofc/codegen/FortranGenerator.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) } - } -- 2.47.3