summaryrefslogtreecommitdiff
path: root/2.3-1/macros/runscicode.sci
blob: 94b76a17380adc2cc6c2111269b356bc1edc7206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
function runscicode(UserScilabMainFile, UserSciFilesPaths)
// 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('-----------------------------------');
exec(UserScilabMainFile);
[tmppath,tmpfile,tmpext] = fileparts(UserScilabMainFile);
//cd(tmppath);
execstr(tmpfile);
//cd(RunSci2CMainDir);
disp('------------------------------------------');
disp('--- End Execution of your SCILAB code. ---');
disp('------------------------------------------');


endfunction