[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Jump from 2.1.65 to 2.9.5
From: |
John W. Eaton |
Subject: |
Re: Jump from 2.1.65 to 2.9.5 |
Date: |
Sun, 16 Apr 2006 12:32:57 -0400 |
On 16-Apr-2006, Daniel J Sebald wrote:
| I suppose that is one way of looking at it. Of course, if one
| thinks in the manner of C where escape characters are always
| enterpretted as single characters, whether inside single or double
| quotes, whether as an argument of a function or not, it's confusing.
Octave was originally consistent. There was no difference between
'single-quoted' and "double-quoted" character strings. But then we
discovered how Matlab really handles backslash escapes (or doesn't, as
they are only interpreted specially in the formats of the *printf
functions) and this caused some incompatibilities becuase people
wanted to be able to run code written for Matlab that include things
like 'c:\research\files'. With Octave, the \r would be converted into
a carriage return character. So the option was to ignore the
compatibility problem (not fun, as people would keep complaining),
change the behavior of all character strings to be Matlab-compatible,
or do what we did, so code written for Matlab will work without change
and code written for Octave (with double-quoted character strings)
will also continue to work as before. It seemed like the best option
to me. Also, Octave is not the only program that treats "" and ''
differently. For example, the Unix shell does this:
echo '$HOME' --> $HOME
echo "$HOME" --> /home/user
Maybe it's because of this that I don't find the different behavior of
"" and '' in Octave all that strange.
jwe
- Jump from 2.1.65 to 2.9.5, Daniel J Sebald, 2006/04/15
- Re: Jump from 2.1.65 to 2.9.5, Bill Denney, 2006/04/15
- Re: Jump from 2.1.65 to 2.9.5, Daniel J Sebald, 2006/04/16
- Re: Jump from 2.1.65 to 2.9.5, Bill Denney, 2006/04/16
- Re: Jump from 2.1.65 to 2.9.5, Søren Hauberg, 2006/04/16
- Re: Jump from 2.1.65 to 2.9.5, Daniel J Sebald, 2006/04/16
- Re: Jump from 2.1.65 to 2.9.5,
John W. Eaton <=
- Re: Jump from 2.1.65 to 2.9.5, Daniel J Sebald, 2006/04/16
- Re: Jump from 2.1.65 to 2.9.5, Rafael Laboissiere, 2006/04/22