Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #138727
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Keith Thompson <kst-u@mib.org> |
| Newsgroups | comp.lang.c |
| Subject | Re: assigning constant values to complex structure |
| Date | Mon, 17 Dec 2018 18:56:31 -0800 |
| Organization | None to speak of |
| Lines | 29 |
| Message-ID | <lnk1k7ee5c.fsf@kst-u.example.com> (permalink) |
| References | <pv9jcr$qg0$1@gioia.aioe.org> <TBYRD.63639$krL1.1252@fx15.am4> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Info | reader01.eternal-september.org; posting-host="293fcf4c88fbd1418164e5e9e2c7a0cd"; logging-data="16776"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188/xvuMROfInwyRNtju+w9" |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
| Cancel-Lock | sha1:8/Ijdcur3DAYJMYDampfNgcQeXI= sha1:855u6la+dKGF2RICbf9GNUICEvs= |
| Xref | csiph.com comp.lang.c:138727 |
Show key headers only | View raw
Bart <bc@freeuk.com> writes:
[...]
> struct letteroclass_bin
> {
> union
> {
> wint_t l; // letter;
> struct
> {
> unsigned char list1[20];
> unsigned char list2[22];
> unsigned char list3[29];
> } jlist;
> } letteroclass;
> unsigned char current_data_type;
> } a = { L'a', 1 } ;
>
> But the elements must be constants.
In C99 or later, the elements need not be constant expressions unless
the object is static (defined with the "static" keyword or at file
scope).
--
Keith Thompson (The_Other_Keith) kst@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
assigning constant values to complex structure chano <chano@nospam.no> - 2018-12-18 01:43 +0000
Re: assigning constant values to complex structure Bart <bc@freeuk.com> - 2018-12-18 02:05 +0000
Re: assigning constant values to complex structure Keith Thompson <kst-u@mib.org> - 2018-12-17 18:56 -0800
Re: assigning constant values to complex structure Keith Thompson <kst-u@mib.org> - 2018-12-17 18:31 -0800
Re: assigning constant values to complex structure chano <chano@nospam.no> - 2018-12-18 18:11 +0000
Re: assigning constant values to complex structure James Kuyper <jameskuyper@alumni.caltech.edu> - 2018-12-18 10:58 -0800
Re: assigning constant values to complex structure Keith Thompson <kst-u@mib.org> - 2018-12-18 12:05 -0800
Re: assigning constant values to complex structure chano <chano@nospam.no> - 2018-12-19 19:44 +0000
Re: assigning constant values to complex structure James Kuyper <jameskuyper@alumni.caltech.edu> - 2018-12-19 11:50 -0800
Re: assigning constant values to complex structure chano <chano@nospam.no> - 2018-12-19 20:27 +0000
Re: assigning constant values to complex structure William Ahern <william@25thandClement.com> - 2018-12-19 13:20 -0800
Re: assigning constant values to complex structure James Kuyper <jameskuyper@alumni.caltech.edu> - 2018-12-19 14:08 -0800
Re: assigning constant values to complex structure David Brown <david.brown@hesbynett.no> - 2018-12-20 08:15 +0100
Re: assigning constant values to complex structure Siri Cruise <chine.bleu@yahoo.com> - 2018-12-19 14:59 -0800
csiph-web