diff options
author | siddhu8990 | 2016-05-27 11:50:04 +0530 |
---|---|---|
committer | siddhu8990 | 2016-05-27 11:50:04 +0530 |
commit | 212c54043e454e41ca4b23a5b965d4dbd4b683fe (patch) | |
tree | c1b62c677facad021562292b823b5e21978c0e4b /macros/ASTManagement/AST_HandleEndGenFun.sci | |
parent | a6d6a9c1e88b75668868af691c9731075a514ffb (diff) | |
download | Scilab2C_fossee_old-212c54043e454e41ca4b23a5b965d4dbd4b683fe.tar.gz Scilab2C_fossee_old-212c54043e454e41ca4b23a5b965d4dbd4b683fe.tar.bz2 Scilab2C_fossee_old-212c54043e454e41ca4b23a5b965d4dbd4b683fe.zip |
Support for basic ODE function added
Diffstat (limited to 'macros/ASTManagement/AST_HandleEndGenFun.sci')
-rw-r--r-- | macros/ASTManagement/AST_HandleEndGenFun.sci | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/macros/ASTManagement/AST_HandleEndGenFun.sci b/macros/ASTManagement/AST_HandleEndGenFun.sci index b08ab39..41c4cb4 100644 --- a/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -197,14 +197,18 @@ global STACKDEDUG //as it is passed as string to C function. Also enter this function in conversion list also. if(ASTFunName == 'ode') if NInArg == 4 - InArg(4).Scope = 'String'; - ODEFunName = InArg(4).Name; + //InArg(4).Scope = 'String'; + ODEFunName = InArg(4).Name; + InArg(4).Name = 'odefn'+ InArg(4).Name + //To differentiate functions containing differential equations, + //'odefn' is added at the beginning of the function name. + SharedInfo.ODElist($+1) = InArg(4).Name; + //Add ode function in list. this will be used to add corresponding + //header file in main function. end end - [InArg,SharedInfo] = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo); - if(ASTFunName == 'ode') - disp(InArg(4).Name); - end + [InArg,SharedInfo] = ST_GetInArgInfo(InArg,NInArg,FileInfo,SharedInfo,ASTFunName); + end // #RNU_RES_B @@ -361,11 +365,12 @@ global STACKDEDUG ODE_InArg(1) = InArg(3) ODE_InArg(2) = InArg(1) ODE_OutArg(1) = OutArg(1) - ODE_CFunName = C_GenerateFunName(ODEFunName,ODE_InArg,2,ODE_OutArg,1); - + 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. + [FunFound, FunType, FunSize, FunValue, FunFindLike, FunDimension] = ... ST_Get(InArg(4).Name,FileInfo.GlobalVarFileName); - disp(FunFound); //ST_Del(InArg(4).Name,FileInfo.GlobalVarFileName); //ST_Set(ODE_CFunName, FunType, FunSize, FunValue, FunFindLike, FunDimension); end |