Skip to content

Commit

Permalink
fix in cpp template for asub operator
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17176 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
niklwors committed Sep 11, 2013
1 parent fd3a43d commit f861d37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/Template/CodegenCpp.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5002,9 +5002,9 @@ template daeExpAsub(Exp inExp, Context context, Text &preExp /*BUFP*/,
case ASUB(exp=e, sub=indexes) then
let exp = daeExp(e, context, &preExp /*BUFC*/, &varDecls /*BUFD*/,simCode)
// let typeShort = expTypeFromExpShort(e)
let expIndexes = (indexes |> index => '<%daeExpASubIndex(index, context, &preExp, &varDecls,simCode)%>' ;separator="+1][")
let expIndexes = (indexes |> index => '<%daeExpASubIndex(index, context, &preExp, &varDecls,simCode)%>' ;separator="][")
//'<%typeShort%>_get<%match listLength(indexes) case 1 then "" case i then '_<%i%>D'%>(&<%exp%>, <%expIndexes%>)'
'(<%exp%>)[<%expIndexes%>+1]'
'(<%exp%>)[<%expIndexes%>]'
case exp then
error(sourceInfo(),'OTHER_ASUB <%printExpStr(exp)%>')
end daeExpAsub;
Expand Down

0 comments on commit f861d37

Please sign in to comment.