Skip to content

Commit

Permalink
- Crazy indentation, tabs
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9404 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jul 4, 2011
1 parent a3d2983 commit bfa10f8
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -3163,44 +3163,42 @@ protected function zerocrossingindex
input list<BackendDAE.ZeroCrossing> zeroCrossings;
input BackendDAE.ZeroCrossing zc;
output tuple<DAE.Exp,list<BackendDAE.ZeroCrossing>,Integer> out_exp;
algorithm out_exp := matchcontinue (exp,index,zeroCrossings,/*inputzeroinfo,*/zc)
local
algorithm
out_exp := matchcontinue (exp,index,zeroCrossings,/*inputzeroinfo,*/zc)
local
DAE.Exp exp,e_1,e1,e2;
DAE.Operator op;
list<BackendDAE.ZeroCrossing> newzero,existzero,zc_lst;
DAE.Operator op;
list<BackendDAE.ZeroCrossing> newzero,existzero,zc_lst;
BackendDAE.ZeroCrossing z_c,zc1;
Integer indx,length,eq_count,wc_count/*, new_idx*/;
Integer indx,length,eq_count,wc_count/*, new_idx*/;
BackendDAE.Variables vars,knvars;
String str;
case ((exp as DAE.RELATION(exp1 = e1,operator = op,exp2 = e2)),index,zeroCrossings,z_c)
equation
case ((exp as DAE.RELATION(exp1 = e1,operator = op,exp2 = e2)),index,zeroCrossings,z_c)
equation
{} = Util.listSelect1(zeroCrossings,z_c/*zc1*/, sameZeroCrossing);
zc_lst = listAppend(zeroCrossings, {z_c});
//Debug.fcall("relidx",print, " zerocrossingindex 1 : " +& ExpressionDump.printExpStr(exp) +& " index: " +& intString(index) +& "\n");
then
((exp,zc_lst,index));
case ((exp as DAE.RELATION(exp1 = e1,operator = op,exp2 = e2)),index,zeroCrossings,z_c)
equation
then
((exp,zc_lst,index));
case ((exp as DAE.RELATION(exp1 = e1,operator = op,exp2 = e2)),index,zeroCrossings,z_c)
equation
newzero= Util.listSelect1(zeroCrossings,z_c, sameZeroCrossing);
length=listLength(newzero);
BackendDAE.ZERO_CROSSING((e_1 as DAE.RELATION(_,_,_,indx,_)),_,_)=Util.listFirst(newzero);
BackendDAE.ZERO_CROSSING((e_1 as DAE.RELATION(_,_,_,indx,_)),_,_)=Util.listFirst(newzero);
//Debug.fcall("relidx",print, " zerocrossingindex 2: results " +& ExpressionDump.printExpStr(e_1)+& "index: " +& intString(indx) +& " lenght: " +& intString(length) +& "\n");
then
((e_1,zeroCrossings,indx));
then
((e_1,zeroCrossings,indx));
case (exp ,_,_,_)
equation
equation
str = " failure in zerocrossingindex for: " +& ExpressionDump.printExpStr(exp);
Error.addMessage(Error.INTERNAL_ERROR, {str});
then fail();

end matchcontinue;

end zerocrossingindex;





protected function traverseStmtsExps "function: traverseStmtExps
Handles the traversing of list<DAE.Statement>.
Works with the help of Expression.traverseExpTopDown to find
Expand Down

0 comments on commit bfa10f8

Please sign in to comment.