/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
- smart_pointer_simple
- f = Foo();
- b = Bar(f);
- b.x = 3;
- if (b.getx() != 3)
- error
- endif
- fp = b.__deref__();
- fp.x = 4;
- if (fp.getx() != 4)
- error
- endif