[Top][All Lists]

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

Re: Make Octave behave more like Matlab

From: John W. Eaton
Subject: Re: Make Octave behave more like Matlab
Date: Fri, 16 Feb 2007 15:57:43 -0500

On 16-Feb-2007, Matthias Brennwald wrote:

| On 16.02.2007, at 21:22, John W. Eaton wrote:
| > | 1. Strings can be defined with single or double quotes in Octave,
| > | while Matlab only accepts single quotes. For instance, this will  
| > work
| > | in Octave, but not in Matlab:
| > |
| > | myString = "Hello";
| >
| > Have you reported this bug to the MathWorks?
| Uhm, no, mainly this is no bug. My above comment is just plain wrong.

Are you sure?  I think it is at least a misfeature that Matlab
recognizes the double quotes and then tells you to use single quotes
instead.  Wouldn't it be simpler if double quotes were just accepted?
OTOH, then the MathWorks would probably make them behave just the same as
single quotes (no C-style backslash escape expansion), and then we
would really have a compatibility problem.  So on second thought, no,
please do not ask them to fix this misfeature unless you think you can
also convince them to handle double quoted character strings in an
Octave compatible way.

| But: the below example with the switch / case statements won't work  
| in Matlab if the single quotes are replaced by double quotes (Octave  
| does not care). I hope this time I'm right -- I can't test because I  
| don't have Matlab at the moment. I'm just forwarding the comments I  
| received from a Matlab user).

So what is it that you want Octave to do here?


reply via email to

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