PageRenderTime 11ms CodeModel.GetById 1ms app.highlight 9ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1.3.35/Examples/test-suite/octave/smart_pointer_simple_runme.m

#
MATLAB | 15 lines | 12 code | 3 blank | 0 comment | 2 complexity | cf2e9d0dc0677c3b9aa5355ec43bc412 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1smart_pointer_simple
 2
 3f = Foo();
 4b = Bar(f);
 5
 6b.x = 3;
 7if (b.getx() != 3)
 8    error
 9endif
10
11fp = b.__deref__();
12fp.x = 4;
13if (fp.getx() != 4)
14    error
15endif