[BRLTTY] readable struct initialisation

Dave Mielke dave at mielke.cc
Fri Mar 3 16:57:42 EST 2006


[quoted lines by Nicolas Pitre on 2006/03/03 at 16:34 -0500]

>What you probably want is the C99 standard equivalent:
>
>    .name = "Modular 20+4",
>    .identifier = 0X80,
>    .columns = 20,

Yes, on both counts. I like the naming of the fields, and I also like the C99
syntax much better. We already have code which initializes arrays with the
syntax:

   [index] = value

We used to have some code which initialized an array element rnage with the
syntax:

   [from ... to] = value

This, however, was rejected by one of the compilers which we must please. Can
anyone tell me if C99 is supposed to support it or not?

-- 
Dave Mielke           | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
EMail: dave at mielke.cc | Canada  K2A 1H7   | if you're concerned about Hell.
http://FamilyRadio.com/                   | http://Mielke.cc/bible/


More information about the BRLTTY mailing list