help-octave
[Top][All Lists]
Advanced

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

RE: override display() for class


From: CdeMills
Subject: RE: override display() for class
Date: Fri, 10 Dec 2010 09:14:37 -0800 (PST)


Steve White wrote:
> 
> 
> The question is, how do I emulate the built-in behavior wherein
> typing in an assignment results in the variable name as well as
> the value being printed?
> 
> 

I looked briefly into MatLab, and Octave behaviour is quite similar:
a= 1
results in
a = 
     1
while
b=someclass(randn(3, 3))
results in a call to display(b)

so the behaviour you're asking for is only valid, as far as I can see, for
basic types: double, int, ...

Regards

Pascal

-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/override-display-for-class-tp3081116p3082347.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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