diff options
author | jofret | 2009-04-28 07:11:01 +0000 |
---|---|---|
committer | jofret | 2009-04-28 07:11:01 +0000 |
commit | b22f596ce449869bffd8e0f63baee1c53e20fa06 (patch) | |
tree | 24e5c3ca47f535b5340a969edf31b774b356848b /macros/runscicode.sci | |
parent | f96b66fe2423831bcad2f141469de6805364d019 (diff) | |
download | scilab2c-b22f596ce449869bffd8e0f63baee1c53e20fa06.tar.gz scilab2c-b22f596ce449869bffd8e0f63baee1c53e20fa06.tar.bz2 scilab2c-b22f596ce449869bffd8e0f63baee1c53e20fa06.zip |
Moving macros here
Diffstat (limited to 'macros/runscicode.sci')
-rw-r--r-- | macros/runscicode.sci | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/macros/runscicode.sci b/macros/runscicode.sci new file mode 100644 index 00000000..79184d1d --- /dev/null +++ b/macros/runscicode.sci @@ -0,0 +1,64 @@ +function runscicode(SCI2CInputPrmFile) +// function runscicode(SCI2CInputPrmFile) +// ----------------------------------------------------------------- +// === hArtes/PoliBa/GAP SCI2C tool === +// === Authors: === +// === Raffaele Nutricato === +// === raffaele.nutricato@tiscali.it === +// === Alberto Morea === +// +// Run the code written by the user before translating it. +// +// Input data: +// --- +// Output data: +// --- +// +// Status: +// 11-Apr-2007 -- Raffaele Nutricato: Author. +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + +// ------------------- +// --- Soft reset. --- +// ------------------- +mode(-1); +clc; +// ----------------------- +// --- End Soft reset. --- +// ----------------------- + +// ------------------------- +// --- Input Parameters. --- +// ------------------------- +RunSci2CMainDir = pwd(); +// ----------------------------- +// --- End input Parameters. --- +// ----------------------------- + +cd(fullfile(RunSci2CMainDir,'ToolInitialization')); +exec('INIT_SCI2CLoader.sce'); +cd(RunSci2CMainDir); + +// --- Read user parameters. --- +exec(SCI2CInputPrmFile); + + +// --- Add all user paths. --- +for cntpath = 1:size(UserSciFilesPaths,1) + getd(UserSciFilesPaths(cntpath)); +end + +// --- Execute code. --- +disp('-----------------------------------'); +disp('--- Executing your SCILAB code. ---'); +disp('-----------------------------------'); +[tmppath,tmpfile,tmpext] = fileparts(UserScilabMainFile); +cd(tmppath); +execstr(tmpfile); +cd(RunSci2CMainDir); +disp('------------------------------------------'); +disp('--- End Execution of your SCILAB code. ---'); +disp('------------------------------------------'); |