[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: equivalent for C-style init: structname varname[] = {...} ?
From: |
Dimitri Maziuk |
Subject: |
Re: equivalent for C-style init: structname varname[] = {...} ? |
Date: |
Mon, 19 Nov 2012 20:31:13 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121030 Thunderbird/10.0.10 |
On 11/19/2012 07:26 PM, Sergei Steshenko wrote:
> octave:3> foo."foo bar" = 1
> parse error:
>
> syntax error
>
>>>> foo."foo bar" = 1
> ^
>
> octave:3>
> ",
>
> 2)
> "
> octave:3> foo = struct
> foo =
>
> scalar structure containing the fields:
>
>
> octave:4> foo.("foo bar") = 1
> error: invalid structure field name `foo bar'
> octave:4>
> "
>
> should work exactly because "foo bar" is a valid hash key.
>
>
> And, as shown before, the key is accepted through 'setfield':
I suspect it's because nobody does it. There may be some reason why
lexer won't easily tokenize foo."foo bar" into foo, dot, and "foo bar",
but I can't think of one right now.
--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
signature.asc
Description: OpenPGP digital signature
- Re: equivalent for C-style init: structname varname[] = {...} ?, (continued)
- Re: equivalent for C-style init: structname varname[] = {...} ?, Sergei Steshenko, 2012/11/20
- Re: equivalent for C-style init: structname varname[] = {...} ?, Ben Abbott, 2012/11/20
- Re: equivalent for C-style init: structname varname[] = {...} ?, Francesco Potortì, 2012/11/21
- Re: equivalent for C-style init: structname varname[] = {...} ?, Dimitri Maziuk, 2012/11/19
- Re: equivalent for C-style init: structname varname[] = {...} ?, Jordi Gutiérrez Hermoso, 2012/11/19
- Re: equivalent for C-style init: structname varname[] = {...} ?, Sergei Steshenko, 2012/11/19
- Re: equivalent for C-style init: structname varname[] = {...} ?,
Dimitri Maziuk <=
- Re: equivalent for C-style init: structname varname[] = {...} ?, Sergei Steshenko, 2012/11/19
- Acknowledge in paper, Ismael Diego Nunez-Riboni, 2012/11/14
- Re: Acknowledge in paper, Juan Pablo Carbajal, 2012/11/14
- Re: Acknowledge in paper, Nicholas Jankowski, 2012/11/14
- Re: Acknowledge in paper, c., 2012/11/14
- Re: Acknowledge in paper, Nicholas Jankowski, 2012/11/14
- Re: Acknowledge in paper, Ismael Diego Nunez-Riboni, 2012/11/14
- Re: Acknowledge in paper, Ismael Diego Nunez-Riboni, 2012/11/14
- Re: Acknowledge in paper, Francesco Potortì, 2012/11/15
- Re: Acknowledge in paper, Jordi Gutiérrez Hermoso, 2012/11/14