help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about subsref in a new data type


From: jiaguo
Subject: Question about subsref in a new data type
Date: Wed, 23 Jun 2004 08:59:14 -0500

Hi all,

I am now adding a new data type into octave. I defined a
subsasgn function in the new data type so that in the equation
 'obj.field=1', the value 1 will be assigned to memeber
'field' in my class. In order to make it work, I also write
method:
bool is_map(void) const {return true;}

By doing it, it works when I directly type 'obj.field=1' in
the  command line. However, if I put it into a .m file and
call it from the .m file, octave cannot recognize my data type
and treat obj as a struct. 

BTW, I couldn't find the example of subsref in the forge
directory.

Does anybody have this problem before or any suggestions how
to do subsref?

Thanks a lot!

Jia





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]