[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with interpolation code
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: Help with interpolation code |
Date: |
Wed, 27 Jun 2012 10:11:06 -0400 |
On 27 June 2012 09:43, Andy Buckle <address@hidden> wrote:
> On 27 June 2012 14:28, mantale1 <address@hidden> wrote:
>> I could, but I wanted to write the code for myself. The real issue is why my
>> else/elseif statement when I try to set method == 'nearest' doesn't work.
>> This is really just for my own education.
>
> Knowledge for its own sake is noble.
>
> The comparison operator, ==, is not doing what you think it is for
> strings. Use strcmp.
>
>>'123'=='1234'
> error: mx_el_eq: nonconformant arguments (op1 is 1x3, op2 is 1x4)
Hm, this really needs a better error message. Mentioning the internal
name of the C++ comparison function is very confusing.
Not that anyone really reads error messages ("it doesn't work",
"Octave crashed", "something is wrong"), but in case they do, they
deserve a better message.
I'll add this to my TODO, but I hope someone else beats me to writing a patch.
- Jordi G. H.