PageRenderTime 13ms CodeModel.GetById 2ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 1ms

/trunk/Examples/test-suite/octave/array_member_runme.m

#
Objective C | 25 lines | 17 code | 8 blank | 0 comment | 7 complexity | 63101fc35a8e9e520ab5d63757b5456f MD5 | raw file
 1array_member
 2
 3f = Foo();
 4f.data = cvar.global_data;
 5
 6for i=0:7,
 7    if (get_value(f.data,i) != get_value(cvar.global_data,i))
 8      error("Bad array assignment");
 9    endif
10endfor
11
12for i=0:7,
13    set_value(f.data,i,-i);
14endfor
15
16cvar.global_data = f.data;
17
18for i=0:7,
19  if (get_value(f.data,i) != get_value(cvar.global_data,i))
20    error("Bad array assignment")
21  endif
22endfor
23
24
25