From c75fb67154fb5679d6ede9a52d5f5ae15600f9f9 Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Mon, 6 Jun 2016 09:18:33 +0530 Subject: File handling functions added --- macros/ASTManagement/AST_HandleEndGenFun.sci | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'macros/ASTManagement/AST_HandleEndGenFun.sci') diff --git a/macros/ASTManagement/AST_HandleEndGenFun.sci b/macros/ASTManagement/AST_HandleEndGenFun.sci index 41c4cb40..0bc12992 100644 --- a/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -205,6 +205,10 @@ global STACKDEDUG SharedInfo.ODElist($+1) = InArg(4).Name; //Add ode function in list. this will be used to add corresponding //header file in main function. + elseif NInArg == 5 + ODEFunName = InArg(5).Name; + InArg(5).Name = 'odefn'+ InArg(5).Name + SharedInfo.ODElist($+1) = InArg(5).Name; end end [InArg,SharedInfo] = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo,ASTFunName); @@ -362,9 +366,15 @@ global STACKDEDUG ST_InsOutArg(OutArg,NOutArg,FileInfo,SharedInfo,'all'); end if ASTFunName == 'ode' then - ODE_InArg(1) = InArg(3) - ODE_InArg(2) = InArg(1) - ODE_OutArg(1) = OutArg(1) + if NInArg == 4 + ODE_InArg(1) = InArg(3) + ODE_InArg(2) = InArg(1) + ODE_OutArg(1) = OutArg(1) + elseif NInArg == 5 then + ODE_InArg(1) = InArg(4) + ODE_InArg(2) = InArg(2) + ODE_OutArg(1) = OutArg(1) + end ODE_CFunName = C_GenerateFunName('odefn'+ODEFunName,ODE_InArg,2,ODE_OutArg,1); //Functions containing differential equations that are used with 'ode' //function need to be handled differently. -- cgit