Skip to content

Commit

Permalink
Fix problems in the generator of fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
pradal committed Oct 22, 2024
1 parent a56c9e9 commit 19a01f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pycropml/transpiler/generators/fortranGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,11 @@ def visit_subroutine_def(self, node):
self.visit_declaration(newNode) #self.visit_decl(node)
if self.initialValue:
for n in self.initialValue:
if len(n.value)>=1 and (isinstance(n.pseudo_type, list) and n.pseudo_type[0] in ("list", "array")):
if not isinstance(n.value, list) and isinstance(n.value, Node):
self.write("%s = " %n.name)
self.visit(n.value)
self.newline(node)
elif len(n.value)>=1 and (isinstance(n.pseudo_type, list) and n.pseudo_type[0] in ("list", "array")):
self.write("%s = " %n.name)
self.write(u'(/')
self.comma_separated_list(n.value)
Expand Down

0 comments on commit 19a01f5

Please sign in to comment.