view examples/@polynomial/get.m @ 8256:dba0037e6602

Import new texinfo.tex allowing @ in directory name. Update OOP example class location
author David Bateman <dbateman@free.fr>
date Wed, 22 Oct 2008 04:16:36 +0100
parents examples/polynomial/get.m@0c91b9a17dcf
children 567e3e4ab74d
line wrap: on
line source

function s = get (p, f)
  if (nargin == 1)
    s.poly = p.poly;
  elseif (nargin == 2)
    if (ischar (f))
      switch (f)
	case "poly"
	  s = p.poly;
	otherwise
	  error ("get: invalid property %s", f);
      endswitch
    else
      error ("get: expecting the property to be a string");
    endif
  else
    print_usage ();
  endif
endfunction