[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to convert octave_value to string?
From: |
Jaroslav Hajek |
Subject: |
Re: How to convert octave_value to string? |
Date: |
Thu, 4 Sep 2008 07:12:01 +0200 |
On Wed, Sep 3, 2008 at 11:04 PM, John W. Eaton <address@hidden> wrote:
> On 3-Sep-2008, Jaroslav Hajek wrote:
>
> | Consider:
> |
> | octave:1> class (1 + 1)
> | ans = double
> | octave:2> class (single(1) + 1)
> | ans = single
> | octave:3> class (int32(1) + 1)
> | ans = int32
> | octave:4> class (logical(1) + 1)
> | ans = double
> | octave:5> class (char(1) + 1)
> | ans = double
> |
> | I bet that novices to both Matlab and Octave will think "wtf?" here...
> | yeah and watch this:
> | octave:6> class (logical(1) + char(1))
> | ans = double
> |
> | amazing, right?
>
> People seem to want Octave to be a Matlab "clone", so I don't think we
> get to choose this behavior. Instead, I think you can blame Cleve for
> these design decisions.
>
Yes, I do blame him (or, rather, Mathworks), I didn't mean to accuse
the Octave community :) Also, I understand the reasons that led to
such choices, but that doesn't make the result any more satisfactory.
I hope that if eventually we decide that Matlab compatibility is no
longer a priority, we'll be able to clean up the mess.
> jwe
>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz