[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}) |
Date: |
Mon, 8 Aug 2011 14:25:10 -0500 |
Sergei, against my better judgement, I'm going to try to help you
understand what nobody else has been able to.
And please don't respond with another screen session. If anything,
just show me the commands. I'm perfectly able to type them myself and
see what they produce without your screen session.
Suppose you have
foo = {"omg", "lol", "brb"}
then you are making a mistake by thinking of foo{:} as a single
object. It's not a single thing. It's three separate things. It's not
an array. Internally, it's a cs-list, but that internal implementation
is not really exposed in the interpreter (e.g. you can't get
typeinfo() or class() to tell you it's a cs-list). Syntactically, it
is completely equivalent to foo{1}, foo{2}, foo{3}, except it doesn't
get echoed.
a = foo{:}
is completely equivalent to
a = foo{1}, foo{2}, foo{3}
and
bar(foo{:})
is completely equivalent to
bar(foo{1}, foo{2}, foo{3})
And that's all there is to it. The expression foo{3} refers to 3
separate things, and there are very many good reasons why it is. Stop
thinking or suggesting it should be one. Let me repeat: please don't
respond with another screen dump.
- Jordi G. H.
- foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}), Sergei Steshenko, 2011/08/08
- Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}), Sergei Steshenko, 2011/08/08
- Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}), John W. Eaton, 2011/08/08
- Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}), Sergei Steshenko, 2011/08/08
- Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}),
Jordi Gutiérrez Hermoso <=
- Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}), Przemek Klosowski, 2011/08/08
- Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}), Sergei Steshenko, 2011/08/09
- Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}), James Sherman Jr., 2011/08/08
- Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}), Ben Abbott, 2011/08/08
Re: foo_cs = foo{:} - feature or bug ? (octave-3.4.2); also, sizeof(foo{:}), Sergei Steshenko, 2011/08/09