help-octave
[Top][All Lists]
Advanced

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

Object based octave instead of Object Oriented Octave...


From: John W. Eaton
Subject: Object based octave instead of Object Oriented Octave...
Date: Mon, 13 Apr 2009 15:33:17 -0500

On 11-Apr-2009, James Moliere wrote:

| I'm trying to learn Octave's new 'Object Oriented Programming'.  I must 
| say, I didn't see anywhere in the documentation the concepts of 
| inheritance so I recommend that the phrase 'Object Based Programming' be 
| used.  Please correct me if I'm wrong.
| 
| I also played with a counter class that simply increments when the inc() 
| method is called.
| 
| octave:1> a=counter(1)
| octave:2> b=counter(5)
| octave:3> c=counter(2, a)
| octave:4> c=inc(c)
| 
| with the error
| error: class has no member `other'
| error: evaluating argument list element number 1
| error: evaluating argument list element number 1
| error: called from:
| error:   /home/jmoliere/octave/@counter/inc.m at line 8, column 8
| error:   /home/jmoliere/octave/@counter/inc.m at line 8, column 8
| 
| How do I formerly create class members? ...I couldn't find the phrase 
| 'class member' in the Octave documentation version 3.1.52+.

3.1.52+ indicates that you are using a copy of Octave built from the
Octave development source archive, and that it is out of date.  We
recently made some changes to implement class inheritance that is
intended to be compatible with the way Matlab works.  I'm not sure it
is complete yet, but the recent changes are a move toward full
compatibility.  As a first step, I suggest updating your installation.

jwe


reply via email to

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