Skip to content

Commit

Permalink
- Generate readable generated code
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12547 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Aug 16, 2012
1 parent ec63c6a commit 63461b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Compiler/Template/CodegenC.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6040,16 +6040,16 @@ case BINARY(__) then
else match realExpIntLit(exp2)
case SOME(2) then
let tmp = tempDecl("modelica_real", &varDecls)
let &preExp += '<%tmp%> = <%e1%>;'
let &preExp += '<%tmp%> = <%e1%>;<%\n%>'
'(<%tmp%> * <%tmp%>)'
case SOME(3) then
let tmp = tempDecl("modelica_real", &varDecls)
let &preExp += '<%tmp%> = <%e1%>;'
let &preExp += '<%tmp%> = <%e1%>;<%\n%>'
'(<%tmp%> * <%tmp%> * <%tmp%>)'
case SOME(4) then
let tmp = tempDecl("modelica_real", &varDecls)
let &preExp += '<%tmp%> = <%e1%>;'
let &preExp += '<%tmp%> *= <%tmp%>;'
let &preExp += '<%tmp%> = <%e1%>;<%\n%>'
let &preExp += '<%tmp%> *= <%tmp%>;<%\n%>'
'(<%tmp%> * <%tmp%>)'
case SOME(i) then 'real_int_pow(<%e1%>, <%i%>)'
else 'pow(<%e1%>, <%e2%>)'
Expand Down

0 comments on commit 63461b2

Please sign in to comment.