PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
MATLAB | 21 lines | 14 code | 7 blank | 0 comment | 2 complexity | f9c04f86868d745f8503c53e3eab77d7 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. director_wstring
  2. B=@(string) subclass(A(string),\
  3. 'get_first',A.get_first(self) + " world!",\
  4. 'process_text',@(self) self.smem = u"hello"\
  5. );
  6. b = B("hello");
  7. b.get(0);
  8. if (!strcmp(b.get_first(),"hello world!"))
  9. error(b.get_first())
  10. endif
  11. b.call_process_func();
  12. if (!strcmp(b.smem,"hello"))
  13. error(smem)
  14. endif