How to use the OO features of Octave

David Bateman David.Bateman at motorola.com
Tue Sep 23 08:19:22 CDT 2008


Trying to use the OO features of 3.1.51, I fail on a very basic issue. I 
have a class directory "@myclass" with the constructor

function b = myclass (a)
  b.a = a;
  b = class (b, "myclass");
endfunction

When called I get error

error: class: invalid call from outside class constructor
error: called from:
error:   /home/adb014/nobackup/perso/octave/@myclass/myclass.m at line 
3, column 5

what is the issue with the above? Basically, I thought I might try and 
do some documentation for the OO could with examples, but am failing 
miserably at the moment.

Regards
David

-- 
David Bateman                                David.Bateman at motorola.com
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



More information about the Octave-maintainers mailing list