blob: b69c3fa4632e1518b7340b482f11baf8a47d22e5 (
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
|
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2013 - Scilab Enterprises
//
// This file is distributed under the same license as the Scilab package.
// =============================================================================
loadXcosLibs();
%txt=["a=1";
"function r=foo(v)";
" r=v;";
"endfunction";
"b=2";
"c=foo(3)";
"d=ones(1,1);";
""];
%ll=struct();
[%ll,%ierr] = script2var(%txt, %ll)
%ierr =
0.
%ll =
d: 1
c: 3
b: 2
a: 1
[%ll,%ierr] = script2var(%txt, %ll)
%ierr =
0.
%ll =
d: 1
c: 3
b: 2
a: 1
|