[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: equivalent for C-style init: structname varname[] = {...} ?
From: |
Sergei Steshenko |
Subject: |
Re: equivalent for C-style init: structname varname[] = {...} ? |
Date: |
Tue, 13 Nov 2012 12:54:41 -0800 (PST) |
----- Original Message -----
> From: Yury T. <address@hidden>
> To: address@hidden
> Cc:
> Sent: Tuesday, November 13, 2012 8:58 AM
> Subject: Re: equivalent for C-style init: structname varname[] = {...} ?
>
> Sergei Steshenko-2 wrote
>> The matter is not syntax, it's semantics.
>> ...
>
> And semantics (sense) is brought to us by a means of syntax (language),
> right? Your example is of course quite appropriate. More might be provided.
> :) As the language will hardly change to accomodate multitude of
> perceptions, more the reason to provide a better explanation of what is
> actually there, yes? :)
>
>
>
> --
> View this message in context:
> http://octave.1599824.n4.nabble.com/equivalent-for-C-style-init-structname-varname-tp4646460p4646555.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
>
Here is more crap:
"
octave:1> foo{1} = 1
foo =
{
[1,1] = 1
}
octave:2> foo(1)
ans =
{
[1,1] = 1
}
octave:3> foo(1, 1)
ans =
{
[1,1] = 1
}
octave:4>
"
- what was initiated as a cell array - see the "{1}" can be accessed as regular
vector - see see the "(1)". And, even worse, in this case accessing 'foo' as a
2d object (matrix) also works.
So, there is nothing wrong with your not understanding of "{...}", "(...)" -
the language does not facilitate the understanding.
Regards,
Sergei.
- Re: equivalent for C-style init: structname varname[] = {...} ?, (continued)
- Re: equivalent for C-style init: structname varname[] = {...} ?, Yury T., 2012/11/12
- Re: equivalent for C-style init: structname varname[] = {...} ?, Jordi Gutiérrez Hermoso, 2012/11/12
- Re: equivalent for C-style init: structname varname[] = {...} ?, Yury T., 2012/11/12
- Re: equivalent for C-style init: structname varname[] = {...} ?, Jordi Gutiérrez Hermoso, 2012/11/12
- Re: equivalent for C-style init: structname varname[] = {...} ?, Sergei Steshenko, 2012/11/12
- Re: equivalent for C-style init: structname varname[] = {...} ?, Yury T., 2012/11/13
- Re: equivalent for C-style init: structname varname[] = {...} ?, Sergei Steshenko, 2012/11/13
- Re: equivalent for C-style init: structname varname[] = {...} ?, Yury T., 2012/11/13
- Re: equivalent for C-style init: structname varname[] = {...} ?, Sergei Steshenko, 2012/11/13
- Re: equivalent for C-style init: structname varname[] = {...} ?, Sergei Steshenko, 2012/11/13
- Re: equivalent for C-style init: structname varname[] = {...} ?,
Sergei Steshenko <=
- Re: equivalent for C-style init: structname varname[] = {...} ?, Yury T., 2012/11/14
- Re: equivalent for C-style init: structname varname[] = {...} ?, Jordi Gutiérrez Hermoso, 2012/11/14
- Re: equivalent for C-style init: structname varname[] = {...} ?, Yury T., 2012/11/14
- Re: equivalent for C-style init: structname varname[] = {...} ?, Jordi Gutiérrez Hermoso, 2012/11/14
- Re: equivalent for C-style init: structname varname[] = {...} ?, Yury T., 2012/11/14
- Re: equivalent for C-style init: structname varname[] = {...} ?, Jordi Gutiérrez Hermoso, 2012/11/14
- Re: equivalent for C-style init: structname varname[] = {...} ?, Yury T., 2012/11/14
- Re: equivalent for C-style init: structname varname[] = {...} ?, Jordi Gutiérrez Hermoso, 2012/11/14
- Re: equivalent for C-style init: structname varname[] = {...} ?, Yury Tarasievich, 2012/11/14
- Re: equivalent for C-style init: structname varname[] = {...} ?, Jordi Gutiérrez Hermoso, 2012/11/14