Skip to content

Commit

Permalink
Added expInt function.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4626 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Dec 4, 2009
1 parent fe9751f commit 9060853
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Compiler/Exp.mo
Expand Up @@ -9809,6 +9809,15 @@ algorithm
end matchcontinue;
end expReal;

public function expInt "returns the int value if expression is constant Integer"
input Exp exp;
output Integer i;
algorithm
i := matchcontinue(exp) local Integer i2;
case (DAE.ICONST(i2)) then i2;
end matchcontinue;
end expInt;

public function isExpCrefOrIfExp
"Returns true if expression is a componentRef or an if expression"
input Exp e;
Expand Down

0 comments on commit 9060853

Please sign in to comment.