[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: object behavior with Octave...
From: |
Søren Hauberg |
Subject: |
Re: object behavior with Octave... |
Date: |
Sat, 14 Feb 2009 19:12:59 +0100 |
lør, 14 02 2009 kl. 09:44 -0800, skrev James Moliere:
> BTW, this code doesn't work
> ####################################
> function [ ball ] = create_ball ()
> ball.bounce = @bounce;
> ball.add_volume = @add_volume;
> ball.set_color = @set_color;
> endfunction
>
> function ret = bounce (varargins)
> disp("called bounce");
> endfunction
> function ret = add_volumne (varargins)
> disp("called add_volume");
> ret = 1;
> endfunction
> function ret = set_color (varargins)
> disp("set_color");
> ret = 2;
> endfunction
> ####################################
Well, you have a function called 'add_volumne', but in 'create_ball' you
ask for 'add_volume', so it's not surprising that things don't work.
Søren
- Re: development version does not compile, (continued)
- object behavior with Octave..., James Moliere, 2009/02/14
- Re: object behavior with Octave..., Ben Abbott, 2009/02/14
- Re: object behavior with Octave..., James Moliere, 2009/02/14
- Message not available
- Re: object behavior with Octave..., Ben Abbott, 2009/02/14
- Message not available
- Re: object behavior with Octave..., Ben Abbott, 2009/02/14
- Re: object behavior with Octave..., John W. Eaton, 2009/02/14
- Re: object behavior with Octave..., James Moliere, 2009/02/14
- Re: object behavior with Octave...,
Søren Hauberg <=
- Re: object behavior with Octave..., James Moliere, 2009/02/14
- Re: object behavior with Octave..., John W. Eaton, 2009/02/14
- Re: object behavior with Octave..., James Moliere, 2009/02/14
- Re: object behavior with Octave..., Ben Abbott, 2009/02/14
- Re: object behavior with Octave..., John W. Eaton, 2009/02/14
- Re: object behavior with Octave..., Sergei Steshenko, 2009/02/14