Skip to content

Commit

Permalink
Quote for-equation iterator in Flat Modelica (#8216)
Browse files Browse the repository at this point in the history
  • Loading branch information
perost committed Nov 24, 2021
1 parent 8213b2c commit f6468ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/NFFrontEnd/NFEquation.mo
Expand Up @@ -1143,7 +1143,7 @@ public
case FOR()
algorithm
s := IOStream.append(s, "for ");
s := IOStream.append(s, InstNode.name(eq.iterator));
s := IOStream.append(s, Util.makeQuotedIdentifier(InstNode.name(eq.iterator)));

if isSome(eq.range) then
s := IOStream.append(s, " in ");
Expand Down
4 changes: 2 additions & 2 deletions testsuite/flattening/modelica/scodeinst/CombineSubscripts3.mo
Expand Up @@ -25,8 +25,8 @@ end CombineSubscripts3;
// public Real[3, 4] 'b.x';
// public
// equation
// for i in 1:3 loop
// for j in 2:3 loop
// for 'i' in 1:3 loop
// for 'j' in 2:3 loop
// 'b.x'['i','j'] = 'b.x'['i','j' - 1] + 'b.p'['i'];
// end for;
// end for;
Expand Down

0 comments on commit f6468ae

Please sign in to comment.