@@ -61,21 +61,20 @@ template crefToCStrForArray(ComponentRef cr, Text& dims)
6161::=
6262 match cr
6363 case CREF_IDENT(__) then
64- let &dims+=listLength(subscriptLst)
65- '<%ident%>'
66- case CREF_QUAL(__) then '<%ident%><%subscriptsToCStrForArray(subscriptLst)%>_P_<%crefToCStrForArray(componentRef,dims)%>'
67-
64+ let &dims+=listLength(subscriptLst)
65+ '<%ident%>_ '
66+ case CREF_QUAL(__) then
67+ '<%ident%><%subscriptsToCStrForArray(subscriptLst)%>_P_<%crefToCStrForArray(componentRef,dims)%>'
6868 case WILD(__) then ' '
6969 else "CREF_NOT_IDENT_OR_QUAL"
7070end crefToCStrForArray;
7171
72-
7372template crefToCStr1(ComponentRef cr, Boolean useFlatArrayNotation)
7473::=
7574 match cr
76- case CREF_IDENT(__) then '<%ident%>'
77- case CREF_QUAL(__) then '<%ident%><%subscriptsToCStrForArray(subscriptLst)%>_P_<%crefToCStr1(componentRef,useFlatArrayNotation)%>'
78-
75+ case CREF_IDENT(__) then '<%ident%>_ '
76+ case CREF_QUAL(__) then
77+ '<%ident%><%subscriptsToCStrForArray(subscriptLst)%>_P_<%crefToCStr1(componentRef,useFlatArrayNotation)%>'
7978 case WILD(__) then ' '
8079 else "CREF_NOT_IDENT_OR_QUAL"
8180end crefToCStr1;
@@ -316,7 +315,7 @@ template crefToCStr(ComponentRef cr, Boolean useFlatArrayNotation)
316315 "Helper function to cref."
317316::=
318317 match cr
319- case CREF_IDENT(__) then '<%ident%><%subscriptsToCStr(subscriptLst, useFlatArrayNotation)%>'
318+ case CREF_IDENT(__) then '<%ident%>_ <%subscriptsToCStr(subscriptLst, useFlatArrayNotation)%>'
320319 case CREF_QUAL(__) then '<%ident%><%subscriptsToCStrForArray(subscriptLst)%>_P_<%crefToCStr(componentRef,useFlatArrayNotation)%>'
321320 case WILD(__) then ''
322321 else "CREF_NOT_IDENT_OR_QUAL"
@@ -2810,7 +2809,7 @@ case CREF(componentRef = cr, ty=DAE.T_COMPLEX(varLst = varLst, complexClassType=
28102809 let lhsStr = contextCref(crefStripSubs(cr), context, simCode , &extraFuncs , &extraFuncsDecl, extraFuncsNamespace, stateDerVectorName, useFlatArrayNotation)
28112810 <<
28122811 <% varLst |> var as TYPES_VAR(__) hasindex i1 fromindex 0 =>
2813- '_<%lhsStr%>_P_ <%var.name%> = <%rhsStr%>.<%var.name%>;'
2812+ '_<%lhsStr%>P_ <%var.name%>_ = <%rhsStr%>.<%var.name%>;'
28142813 ; separator="\n"
28152814 %>
28162815 >>
0 commit comments