/trunk/Examples/test-suite/octave/array_member_runme.m
MATLAB | 25 lines | 17 code | 8 blank | 0 comment | 5 complexity | 63101fc35a8e9e520ab5d63757b5456f MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- array_member
- f = Foo();
- f.data = cvar.global_data;
- for i=0:7,
- if (get_value(f.data,i) != get_value(cvar.global_data,i))
- error("Bad array assignment");
- endif
- endfor
- for i=0:7,
- set_value(f.data,i,-i);
- endfor
- cvar.global_data = f.data;
- for i=0:7,
- if (get_value(f.data,i) != get_value(cvar.global_data,i))
- error("Bad array assignment")
- endif
- endfor