]> git.unchartedbackwaters.co.uk Git - francis/ofc.git/commitdiff
Generate "implicit none" in function.
authorFrancis Russell <francis@unchartedbackwaters.co.uk>
Sun, 20 May 2012 13:54:16 +0000 (14:54 +0100)
committerFrancis Russell <francis@unchartedbackwaters.co.uk>
Sun, 20 May 2012 13:54:16 +0000 (14:54 +0100)
src/ofc/codegen/FortranGenerator.scala

index b65eb94a32ff3abc0736c9f57df97ad9d29f101a..8c654078659a05382274bb6e7c235c44046f6e85 100644 (file)
@@ -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)
   }
-
 }