Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #28322 > unrolled thread

some well known stupidness in c99

Started byfir <profesor.fir@gmail.com>
First post2012-11-18 01:21 -0800
Last post2012-11-27 17:22 -0800
Articles 20 on this page of 221 — 27 participants

Back to article view | Back to comp.lang.c


Contents

  some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 01:21 -0800
    Re: some well known stupidness in c99 Thomas Richter <thor@math.tu-berlin.de> - 2012-11-18 10:41 +0100
    Re: some well known stupidness in c99 SG <sgesemann@gmail.invalid> - 2012-11-18 10:41 +0100
      Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 02:02 -0800
        Re: some well known stupidness in c99 SG <sgesemann@gmail.invalid> - 2012-11-18 11:23 +0100
          Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 02:26 -0800
        Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-18 12:16 +0000
          Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 05:27 -0800
            Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-18 14:24 +0000
              Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 06:44 -0800
                Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 06:50 -0800
                  Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-18 11:07 -0500
            Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-18 12:22 -0500
              Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 09:39 -0800
              Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-18 20:22 +0000
                Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-18 17:04 -0500
                  Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-18 22:45 +0000
                    Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-18 18:02 -0500
                      Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 00:04 +0000
                        Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-18 19:20 -0500
                          Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 00:59 +0000
                            Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-18 20:13 -0500
                              Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 01:36 +0000
                                Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-18 21:12 -0500
                                  Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 11:20 +0000
                        Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-19 11:09 -0500
                          Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 18:25 +0000
                            Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-19 14:02 -0500
                              Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 21:55 +0000
                                Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-19 17:50 -0500
                                  Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-19 23:05 +0000
                                  Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 18:16 -0500
                                    Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-20 08:14 -0500
                                      Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-20 08:33 -0500
                                  Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 23:38 +0000
                                    Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-20 08:19 -0500
                                      Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-20 15:28 +0000
                                        Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-20 13:25 -0800
                                          Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-20 22:22 +0000
                                          Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-20 22:26 +0000
                                            Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-21 00:16 +0000
                                              Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-21 01:05 +0000
                                    Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-20 13:24 -0500
                                      Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-20 18:54 +0000
                                      Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-20 22:31 +0000
                                        Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-20 20:38 -0800
                                        Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-21 12:00 -0500
                                          Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-21 18:30 +0000
                                            Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-21 13:51 -0500
                                              Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-21 19:47 +0000
                                              Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-21 20:21 +0000
                                                Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-21 21:25 +0000
                                                  Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-21 23:02 +0000
                                                    Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-22 11:56 +0000
                                                      Re: some well known stupidness in c99 Rui Maciel <rui.maciel@gmail.com> - 2012-11-22 15:01 +0000
                                                        Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-22 18:43 +0000
                                                  Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-21 23:58 +0000
                                                    Re: some well known stupidness in c99 Rui Maciel <rui.maciel@gmail.com> - 2012-11-22 14:37 +0000
                                                      Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-22 17:12 +0000
                                                  Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-21 16:47 -0800
                                                    Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-22 01:23 +0000
                                                      Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-22 08:19 -0500
                                                    Re: some well known stupidness in c99 Ian Collins <ian-news@hotmail.com> - 2012-11-22 15:34 +1300
                                                      Re: some well known stupidness in c99 Rui Maciel <rui.maciel@gmail.com> - 2012-11-22 04:18 +0000
                                                        Re: some well known stupidness in c99 Ian Collins <ian-news@hotmail.com> - 2012-11-22 17:31 +1300
                                                          Re: some well known stupidness in c99 Rui Maciel <rui.maciel@gmail.com> - 2012-11-22 14:18 +0000
                                                        Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-22 09:28 +0000
                                                          Re: some well known stupidness in c99 Rui Maciel <rui.maciel@gmail.com> - 2012-11-22 14:10 +0000
                                                          Re: some well known stupidness in c99 David Thompson <dave.thompson2@verizon.net> - 2012-11-28 01:12 -0500
                                                            Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-28 09:50 +0000
                                                      Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-22 11:43 +0000
                                                    Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-22 11:34 +0000
                                                      Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-22 09:57 -0800
                                                        Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-22 18:47 +0000
                                                          Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-22 11:39 -0800
                            Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 14:08 -0500
                              Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-19 21:32 +0000
                                Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 16:35 -0500
                              Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 21:51 +0000
                    Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-18 18:38 -0500
                Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-19 14:05 -0500
                  Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 21:25 +0000
                    Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-20 12:21 -0500
              Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-19 13:57 -0500
    Re: some well known stupidness in c99 Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-11-18 03:47 -0800
    Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-18 10:56 -0500
      Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 09:11 -0800
        Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-18 15:10 -0500
          Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 12:52 -0800
            Re: some well known stupidness in c99 Rui Maciel <rui.maciel@gmail.com> - 2012-11-18 21:29 +0000
            Re: some well known stupidness in c99 "Joachim Schmitz" <nospam.jojo@schmitz-digital.de> - 2012-11-18 22:35 +0100
            Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-18 17:00 -0500
              Re: some well known stupidness in c99 Ian Collins <ian-news@hotmail.com> - 2012-11-19 14:38 +1300
                Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-18 21:14 -0500
                Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-19 03:56 +0000
            Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-18 22:06 +0000
              Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-18 23:44 +0000
                Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 01:16 +0000
            Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-18 14:20 -0800
              Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-18 15:33 -0800
              Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 01:21 -0800
                Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 01:45 -0800
                  Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 11:35 +0000
                    Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 05:01 -0800
                      Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-19 15:37 -0500
                    Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 08:21 -0500
                      Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 05:42 -0800
                        Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 06:06 -0800
                          Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 10:02 -0500
                          Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 08:51 -0800
                            Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-19 21:35 +0000
                      Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 09:06 -0500
                        Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 14:25 +0000
                          Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-19 11:42 -0500
                            Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 09:06 -0800
                              Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 12:31 -0500
                                Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 09:42 -0800
                                  Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 13:36 -0500
                                    Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-19 11:57 -0800
                                      Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 15:07 -0500
                                        Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-19 15:21 -0500
                                          Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 15:37 -0500
                                  Re: some well known stupidness in c99 Greg Martin <greg@softsprocket.com> - 2012-11-19 11:10 -0800
                                    Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 11:22 -0800
                                      Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 14:41 -0500
                                      Re: some well known stupidness in c99 Greg Martin <greg@softsprocket.com> - 2012-11-19 12:04 -0800
                                      Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-20 12:08 -0500
                                        Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 11:37 -0800
                                          Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-20 15:33 -0500
                                            Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-20 21:14 +0000
                                              Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-20 16:39 -0500
                                                Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-20 13:57 -0800
                                                  Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-20 17:01 -0500
                                                    Re: some well known stupidness in c99 Ian Collins <ian-news@hotmail.com> - 2012-11-21 11:07 +1300
                                                      Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-20 17:23 -0500
                                                      Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 14:46 -0800
                                                        Re: some well known stupidness in c99 Greg Martin <greg@softsprocket.com> - 2012-11-20 14:56 -0800
                                                          Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 15:10 -0800
                                                            Re: some well known stupidness in c99 Greg Martin <greg@softsprocket.com> - 2012-11-20 15:26 -0800
                                                              Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 16:00 -0800
                                                                Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-21 12:10 -0500
                                                                  Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-21 09:45 -0800
                                                                Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-21 13:43 -0500
                                                                  Re: some well known stupidness in c99 Rosario1903 <Rosario@invalid.invalid> - 2012-11-22 10:25 +0100
                                                                Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-21 12:08 -0800
                                                                  Re: some well known stupidness in c99 Lowell Gilbert <lgusenet@be-well.ilk.org> - 2012-11-21 16:42 -0500
                                                                    Re: some well known stupidness in c99 Ian Collins <ian-news@hotmail.com> - 2012-11-22 10:49 +1300
                                                                      Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-21 15:55 -0800
                                                    Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 14:58 -0800
                                                    Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-21 11:49 -0500
                                                  Re: some well known stupidness in c99 Ian Collins <ian-news@hotmail.com> - 2012-11-21 11:12 +1300
                                                Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-20 22:41 +0000
                                  Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-19 15:46 -0500
                                    Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-19 16:39 -0500
                                      Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-19 16:33 -0800
                                        Re: some well known stupidness in c99 Robert Wessel <robertwessel2@yahoo.com> - 2012-11-20 00:20 -0600
                                    Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-19 22:12 +0000
                                      Re: some well known stupidness in c99 Robert Wessel <robertwessel2@yahoo.com> - 2012-11-20 00:34 -0600
                                Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 10:20 -0800
                                  Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-19 13:40 -0500
                                Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-19 22:00 +0000
                            Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 17:49 +0000
                              Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 11:05 -0800
                            Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-19 21:48 +0000
                              Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-19 17:58 -0500
                                Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-19 23:16 +0000
                                  Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-19 16:39 -0800
                                    Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-20 01:28 +0000
                                  Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-11-20 08:22 -0500
                                    Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-20 19:01 +0000
                                Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 23:50 +0000
                                  Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 23:18 -0800
                                    Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-19 23:28 -0800
                                      Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-20 10:53 +0000
                                        Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 03:19 -0800
                                        Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 03:39 -0800
                                          Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-20 12:52 +0000
                                            Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 04:59 -0800
                                              Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-20 15:47 +0000
                                                Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 11:21 -0800
                                              Re: some well known stupidness in c99 Rui Maciel <rui.maciel@gmail.com> - 2012-11-20 16:11 +0000
                                        Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-20 19:18 +0000
                                    Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 02:51 -0800
                        Re: some well known stupidness in c99 Shao Miller <sha0.miller@gmail.com> - 2012-12-14 23:28 -0500
                          Re: some well known stupidness in c99 Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-12-17 12:37 +0200
                            Re: some well known stupidness in c99 Shao Miller <sha0.miller@gmail.com> - 2012-12-17 06:00 -0500
                              Re: some well known stupidness in c99 Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2012-12-17 23:43 +0200
                                Re: some well known stupidness in c99 pete <pfiland@mindspring.com> - 2012-12-17 19:23 -0500
                                  Re: some well known stupidness in c99 Ian Collins <ian-news@hotmail.com> - 2012-12-18 13:31 +1300
                                    Re: some well known stupidness in c99 pete <pfiland@mindspring.com> - 2012-12-17 20:17 -0500
                                  Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-12-18 00:48 +0000
                                  Re: some well known stupidness in c99 lawrence.jones@siemens.com - 2012-12-18 15:38 -0500
                        Re: some well known stupidness in c99 pete <pfiland@mindspring.com> - 2012-12-16 10:50 -0500
                          Re: some well known stupidness in c99 Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-12-16 10:58 -0500
                          Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-12-16 16:47 -0500
                      Re: some well known stupidness in c99 "BartC" <bc@freeuk.com> - 2012-11-19 14:17 +0000
              Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 00:38 -0800
                Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 02:34 -0800
                  Re: some well known stupidness in c99 pete <pfiland@mindspring.com> - 2012-11-20 07:38 -0500
                    Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 04:47 -0800
                Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-20 13:14 -0800
                  Re: some well known stupidness in c99 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-11-20 21:27 +0000
                    Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-20 16:48 -0500
                  Re: some well known stupidness in c99 Kenneth Brody <kenbrody@spamcop.net> - 2012-11-20 16:28 -0500
                  Re: some well known stupidness in c99 Ian Collins <ian-news@hotmail.com> - 2012-11-21 10:29 +1300
                    Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-20 22:32 +0000
                      Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-20 18:14 -0500
                        Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-21 01:52 +0000
                          Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-20 22:31 -0500
                            Re: some well known stupidness in c99 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-11-21 04:40 +0000
                              Re: some well known stupidness in c99 James Kuyper <jameskuyper@verizon.net> - 2012-11-21 08:11 -0500
                  Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-20 14:02 -0800
                  Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 15:29 -0800
                    Re: some well known stupidness in c99 fir <profesor.fir@gmail.com> - 2012-11-20 16:54 -0800
          Re: some well known stupidness in c99 gof@somewhere.invalid (Adam Wysocki) - 2012-11-20 15:51 +0000
        Re: some well known stupidness in c99 Rui Maciel <rui.maciel@gmail.com> - 2012-11-18 21:26 +0000
    Re: some well known stupidness in c99 Ben Pfaff <blp@cs.stanford.edu> - 2012-11-18 10:57 -0800
    Re: some well known stupidness in c99 Keith Thompson <kst-u@mib.org> - 2012-11-18 13:44 -0800
      Re: some well known stupidness in c99 Richard Damon <news.x.richarddamon@xoxy.net> - 2012-11-18 23:38 -0500
        Re: some well known stupidness in c99 Shao Miller <sha0.miller@gmail.com> - 2012-12-14 23:13 -0500
    Re: some well known stupidness in c99 Stanley Rice <heconghui@gmail.com> - 2012-11-27 17:22 -0800

Page 5 of 12 — ← Prev page 1 … 3 4 [5] 6 7 … 12  Next page →


#28409

FromKenneth Brody <kenbrody@spamcop.net>
Date2012-11-19 14:05 -0500
Message-ID<8PCdnQXqT-F4HzfNnZ2dnUVZ_tCdnZ2d@bestweb.net>
In reply to#28344
On 11/18/2012 3:22 PM, BartC wrote:
>
>
> "Kenneth Brody" <kenbrody@spamcop.net> wrote in message
> news:k6CdnWuVpab7hDTNnZ2dnUVZ_qmdnZ2d@bestweb.net...
[...]
>> ===== file1.c
>>
>> const int table_max = 100;
>>
>> ===== file2.c
>>
>> extern const int table_max;
>>
>> .... references to "table_max" that cannot be a compile-time constant ...
>
> Why not? I can do this in another language (albeit using true named
> constants, rather than read-only variables, although the latter can be
> possible in the same way).

What language allows you to define the value in one module, and compile a 
separate module, which makes no reference to the first module, and the 
compiler "knows" what the constant is?  (And, if you edit and recompile the 
first module, changing the value of said constant, the second module 
magically changes the constant's value?)

> In any case, the language ought to provide true named constants, which are
> pretty fundamental,  not expect everyone to mess around with enums, defines,
> and const attributes. Then the above won't be a problem.

Well, that's a different story.  :-)

-- 
Kenneth Brody

[toc] | [prev] | [next] | [standalone]


#28427

From"BartC" <bc@freeuk.com>
Date2012-11-19 21:25 +0000
Message-ID<_Yxqs.598784$Ol2.28684@fx25.am4>
In reply to#28409

"Kenneth Brody" <kenbrody@spamcop.net> wrote in message 
news:8PCdnQXqT-F4HzfNnZ2dnUVZ_tCdnZ2d@bestweb.net...
> On 11/18/2012 3:22 PM, BartC wrote:
>>
>>
>> "Kenneth Brody" <kenbrody@spamcop.net> wrote in message
>> news:k6CdnWuVpab7hDTNnZ2dnUVZ_qmdnZ2d@bestweb.net...
> [...]
>>> ===== file1.c
>>>
>>> const int table_max = 100;
>>>
>>> ===== file2.c
>>>
>>> extern const int table_max;
>>>
>>> .... references to "table_max" that cannot be a compile-time constant 
>>> ...
>>
>> Why not? I can do this in another language (albeit using true named
>> constants, rather than read-only variables, although the latter can be
>> possible in the same way).
>
> What language allows you to define the value in one module, and compile a 
> separate module, which makes no reference to the first module, and the 
> compiler "knows" what the constant is?  (And, if you edit and recompile 
> the first module, changing the value of said constant, the second module 
> magically changes the constant's value?)

I gave an example of how it might work.

But I don't why you find this surprising: the same sort of magic is used now 
in C, when changes in global variables are reflected across the whole 
program.

And if you point out that this is a variable, whose value is only stored in 
a single place, then I might respond that the variable's /address/ used to 
access it, is a /constant/, used in a myriad places in a program, that all 
magically end up referring to the same location!

-- 
Bartc
 

[toc] | [prev] | [next] | [standalone]


#28477

FromKenneth Brody <kenbrody@spamcop.net>
Date2012-11-20 12:21 -0500
Message-ID<Rfudnc4Bw9e2ITbNnZ2dnUVZ_qqdnZ2d@bestweb.net>
In reply to#28427
On 11/19/2012 4:25 PM, BartC wrote:
> "Kenneth Brody" <kenbrody@spamcop.net> wrote in message
[...]
>> What language allows you to define the value in one module, and compile a
>> separate module, which makes no reference to the first module, and the
>> compiler "knows" what the constant is?  (And, if you edit and recompile
>> the first module, changing the value of said constant, the second module
>> magically changes the constant's value?)
>
> I gave an example of how it might work.
>
> But I don't why you find this surprising: the same sort of magic is used now
> in C, when changes in global variables are reflected across the whole program.
>
> And if you point out that this is a variable, whose value is only stored in
> a single place, then I might respond that the variable's /address/ used to
> access it, is a /constant/, used in a myriad places in a program, that all
> magically end up referring to the same location!

Yes, but the address of a variable is *not* a "compile-time constant".  You 
cannot, for example, do this (admittedly very implementation-dependent) 
construct:

     extern int foo;
     int *pointer = &foo;    // Legal
     char array[(int)&foo];  // Not legal

-- 
Kenneth Brody

[toc] | [prev] | [next] | [standalone]


#28407

FromKenneth Brody <kenbrody@spamcop.net>
Date2012-11-19 13:57 -0500
Message-ID<CtWdnUTsqK-3HDfNnZ2dnUVZ_uednZ2d@bestweb.net>
In reply to#28340
On 11/18/2012 12:22 PM, Kenneth Brody wrote:
[...]
> I find it highly unlikely that this fart of the language will change,
> considering the fact that you can have:
[...]

No, that was not an intentional typo.  :-)

-- 
Kenneth Brody

[toc] | [prev] | [next] | [standalone]


#28328

FromNick Keighley <nick_keighley_nospam@hotmail.com>
Date2012-11-18 03:47 -0800
Message-ID<7ebf13c3-f16b-42b0-a450-da00724fc075@q5g2000vbp.googlegroups.com>
In reply to#28322
On Nov 18, 9:21 am, fir <profesor....@gmail.com> wrote:

> It is sad to say so but there is some real
> and terrible stupidnes in c99. When i wrote
> programs in c (and I am involved c user) I
> just use const int for array boundaries

no you didn't

> but
> in c99 (and some previous too, terribly)

all previous

> it
> will not compile (see for examplehttp://stackoverflow.com/questions/1712592/variably-modified-array-at... ) It is terribly wrong
> thing for ppl who just wants to use const int to this
> purposes and not to use preprocesor - as I do.
> It is terribly stupidness in my opinion, it have to
> be changed.

:-)

C changes pretty slowly so don't hold your breath

[toc] | [prev] | [next] | [standalone]


#28336

FromJames Kuyper <jameskuyper@verizon.net>
Date2012-11-18 10:56 -0500
Message-ID<k8b0ei$d3a$1@dont-email.me>
In reply to#28322
On 11/18/2012 04:21 AM, fir wrote:
> It is sad to say so but there is some real 
> and terrible stupidnes in c99. When i wrote 
> programs in c (and I am involved c user) I
> just use const int for array boundaries but
> in c99 (and some previous too, terribly) it 
> will not compile (see for example 
> http://stackoverflow.com/questions/1712592/variably-modified-array-at-file-scope  ) It is terribly wrong 
> thing for ppl who just wants to use const int to this
> purposes and not to use preprocesor - as I do.
> It is terribly stupidness in my opinion, it have to
> be changed.

In C++, a const object initialized with a constant expression can itself
be used as a constant expression, but in C, this is not the case, and it
has never been the case. You're wrong when you claim to have previously
written C programs where such code worked. Perhaps you actually compiled
them as C++?

I like this feature of C++, and favor it's adoption in C. It would not
break any strictly conforming code, and would allows better type safety
than is provided by the C alternatives. However, describing this as a
stupid feature of C ignores the fact that C does provide perfectly
workable alternatives, such
	#define CONSTANT 4
or
	enum {CONSTANT=4};

Constant expressions are required in the following cases (and possibly
others that I missed):
    _Alignas(CONSTANT)/*C2011*/ static struct {
	unsigned bit_field:CONSTANT
    } array[CONSTANT] =  {
	[CONSTANT/2].bit_field /*C99*/ = CONSTANT
    };
    enum {OTHER=CONSTANT};
    case CONSTANT:
    #if CONSTANT
    #elif CONSTANT
    _Static_assert(CONSTANT, "CONSTANT is 0"); /*C2011*/

C99 didn't make this issue any worse - in fact, C99 no longer required
the use of constant expressions for array dimensions unless the array
was defined with static storage duration (as was the case in your code)
(in C2011, constants are also required for the dimensions of arrays with
thread storage duration). When you don't use a constant expression, the
result is a Variable Length Array, as was mentioned in the title of your
stackoverflow question.

As a result, if you need to have global access to the array (which
suggests that your program is poorly designed), there is another
alternative in C99 or later:

types.h:
static const int NUM_TYPES = 4;
extern int *types;

main.c:
#include <types.h>
int *types;
int main(void)
{
    int type_list[NUM_TYPES] = {
        1,
        2,
        3,
        4 };
    types = type_list;
    // The rest of your program.
}

Is there any reason why none of the C alternatives described above would
be acceptable for use in your program?
-- 
James Kuyper

[toc] | [prev] | [next] | [standalone]


#28339

Fromfir <profesor.fir@gmail.com>
Date2012-11-18 09:11 -0800
Message-ID<6e37296c-acf0-4fb7-8370-9ad3fe80c12e@googlegroups.com>
In reply to#28336
this question on stack overflow was not mine, just found it ocasionally

> 
> Is there any reason why none of the C alternatives described above would
> be acceptable for use in your program?
> 

#define is not acceptable by me I dislike 
using preprocessor and use only few includes 
(do not like it either) and nothing more of it 

enum would be eventually hardly acceptable 
but its just bad (from my aestehetic point of 
view), nothing else to say :<

[toc] | [prev] | [next] | [standalone]


#28343

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2012-11-18 15:10 -0500
Message-ID<k8bfbp$fro$1@dont-email.me>
In reply to#28339
On 11/18/2012 12:11 PM, fir wrote:
> this question on stack overflow was not mine, just found it ocasionally
>
>>
>> Is there any reason why none of the C alternatives described above would
>> be acceptable for use in your program?
>>
>
> #define is not acceptable by me I dislike
> using preprocessor and use only few includes
> (do not like it either) and nothing more of it
>
> enum would be eventually hardly acceptable
> but its just bad (from my aestehetic point of
> view), nothing else to say :<

     In short, "stupidity" is "whatever offends fir's delicate
aesthetic sensibilities."

     Are you related to Reginald Bunthorne?

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

[toc] | [prev] | [next] | [standalone]


#28345

Fromfir <profesor.fir@gmail.com>
Date2012-11-18 12:52 -0800
Message-ID<95e6588e-0464-4e23-b18f-c88ee17a6f94@googlegroups.com>
In reply to#28343
W dniu niedziela, 18 listopada 2012 21:10:33 UTC+1 użytkownik Eric Sosman napisał:
> On 11/18/2012 12:11 PM, fir wrote:
> 
> > this question on stack overflow was not mine, just found it ocasionally
> 
> >
> 
> >>
> 
> >> Is there any reason why none of the C alternatives described above would
> 
> >> be acceptable for use in your program?
> 
> >>
> 
> >
> 
> > #define is not acceptable by me I dislike
> 
> > using preprocessor and use only few includes
> 
> > (do not like it either) and nothing more of it
> 
> >
> 
> > enum would be eventually hardly acceptable
> 
> > but its just bad (from my aestehetic point of
> 
> > view), nothing else to say :<
> 
> 
> 
>      In short, "stupidity" is "whatever offends fir's delicate
> 
> aesthetic sensibilities."
> 
> 

When I wrote some messages on this group
(not many times that was my third visit here)
really I often met a ppl which I see try to make 'much effort to not understand me'
(Really, I see suc thing here)

It would be hard to explain such basic 
things why 

coinst int table_max = 4096;

is better than 

enum { table_max = 4096 }

(this reason is not purely aesthetic but i 
meant that giving up with const ints here 
and go intu enums would be terrible aesthetic 
failure for me) Seem terribly obvious for me,
and not seeing it end using enums here seem 
to be very stupid for me

defines are not such stupid but preprocesor
can be consideren not as part of c but some
external tool to use over it (it was initialy
considered like that, check out c history note)
and i also treat it such way (as external tool
over c, with not to much use for me personally)

it is not to much speak here, just simple 
thing - imo the question is how to made this
change in c language (If I would be C  'director' (I should be*) I would just 
change that 

* becouse I am really well prepared for this things :>

[toc] | [prev] | [next] | [standalone]


#28347

FromRui Maciel <rui.maciel@gmail.com>
Date2012-11-18 21:29 +0000
Message-ID<k8bjvf$dc4$2@dont-email.me>
In reply to#28345
fir wrote:

> defines are not such stupid but preprocesor
> can be consideren not as part of c but
<snip/>

The C preprocessor is C.  It is defined in the C standard.  It can't be more 
C than that.


Rui Maciel

[toc] | [prev] | [next] | [standalone]


#28348

From"Joachim Schmitz" <nospam.jojo@schmitz-digital.de>
Date2012-11-18 22:35 +0100
Message-ID<k8bkbe$avp$1@online.de>
In reply to#28345
fir wrote:
<snip> 
> When I wrote some messages on this group
> (not many times that was my third visit here)
> really I often met a ppl which I see try to make 'much effort to not
> understand me' 
> (Really, I see suc thing here)
> 
> It would be hard to explain such basic
> things why
> 
> coinst int table_max = 4096;
> 
> is better than
> 
> enum { table_max = 4096 }

How can one syntax error be better than another? ;-)

[toc] | [prev] | [next] | [standalone]


#28350

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2012-11-18 17:00 -0500
Message-ID<k8blqb$qdm$1@dont-email.me>
In reply to#28345
On 11/18/2012 3:52 PM, fir wrote:
> [...]
> It would be hard to explain such basic
> things why
>
> coinst int table_max = 4096;
>
> is better than
>
> enum { table_max = 4096 }

     C's enum is not of much use, I'll agree: It's only an int
with lipstick, plus just enough mystery to be alluring before
one gets to know it better.  I wouldn't recommend enum as a
substitute for the kind of "coinst" you desire, even if it can
sometimes be put to that use.

     But where's the case that `#define table_max 4096' is
inferior to "coinst"?  So far, the *only* reason that's been
put forward is "fir doesn't like it."  Somehow, "I don't like
it, therefore it's stupid" doesn't sound like the sort of
proof Euclid would be proud of.

> (this reason is not purely aesthetic but i
> meant that giving up with const ints here
> and go intu enums would be terrible aesthetic
> failure for me) Seem terribly obvious for me,
> and not seeing it end using enums here seem
> to be very stupid for me
>
> defines are not such stupid but preprocesor
> can be consideren not as part of c but some
> external tool to use over it (it was initialy
> considered like that, check out c history note)
> and i also treat it such way (as external tool
> over c, with not to much use for me personally)

     In the very earliest days of C, the preprocessor was in
truth a separate entity.  It didn't exist until about 1972-3,
and for a while the early compilers didn't even run it on
source files that didn't appear to use it.  But its integration
into the language did not take long: by 1978 we find K&R saying
"The C compiler *contains* [emphasis mine] a preprocessor" (p. 207),
not "Hey, there's this extra tool you can use if you like."

     If you've been doing the arithmetic, you'll see that the
preprocessor is at most forty years old and that C's inventor
considered it as contained in the compiler as of at least
thirty-four years ago.  Since the preprocessor has been part
of the language for at least eighty-five percent of its entire
existence, the assertion that it should be thought of as "some
external tool" cannot be taken seriously.

     The preprocessor is a full-fledged part of the language,
and provides the solution to your problem.  Just use it!

-- 
Eric Sosman
esosman@comcast-dot-net.invalid

[toc] | [prev] | [next] | [standalone]


#28366

FromIan Collins <ian-news@hotmail.com>
Date2012-11-19 14:38 +1300
Message-ID<agtgstF5g44U1@mid.individual.net>
In reply to#28350
On 11/19/12 11:00, Eric Sosman wrote:
>
>       But where's the case that `#define table_max 4096' is
> inferior to "coinst"?  So far, the *only* reason that's been
> put forward is "fir doesn't like it."  Somehow, "I don't like
> it, therefore it's stupid" doesn't sound like the sort of
> proof Euclid would be proud of.

The one that really really bugged me was attempting to debug some code 
that had a excess of #define constants was the inability of the debugger 
to evaluate them.  At the time I ended up bunging them all in enums. 
The majority of them were consecutive sequences (return codes for 
example), so the enum made for a better deign.  The rest ended up in a 
collection of odds and sods enums.  Inelegant but debugger friendly.

Another somewhat contrived example is:

#define X 42

void f( const int* p );

int main(void)
{
   f(&X);
}

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#28368

FromJames Kuyper <jameskuyper@verizon.net>
Date2012-11-18 21:14 -0500
Message-ID<k8c4ml$eeq$2@dont-email.me>
In reply to#28366
On 11/18/2012 08:38 PM, Ian Collins wrote:
...
> The one that really really bugged me was attempting to debug some code 
> that had a excess of #define constants was the inability of the debugger 
> to evaluate them.

Some debuggers handle that better. I was rather pleasantly surprised the
first time I accidentally made use of that feature.
-- 
James Kuyper

[toc] | [prev] | [next] | [standalone]


#28370

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2012-11-19 03:56 +0000
Message-ID<0.1e28ea41e50659bb1534.20121119035657GMT.87r4nq9ree.fsf@bsb.me.uk>
In reply to#28366
Ian Collins <ian-news@hotmail.com> writes:

> On 11/19/12 11:00, Eric Sosman wrote:
>>
>>       But where's the case that `#define table_max 4096' is
>> inferior to "coinst"?  So far, the *only* reason that's been
>> put forward is "fir doesn't like it."  Somehow, "I don't like
>> it, therefore it's stupid" doesn't sound like the sort of
>> proof Euclid would be proud of.

<snip debug example>
> Another somewhat contrived example is:
>
> #define X 42
>
> void f( const int* p );
>
> int main(void)
> {
>   f(&X);
> }

You can write f(&(int){X}); so that it will work no matter if X is a
macro, an enum name or an int object (const or otherwise).

I don't suggest this as an elegant solution, but simply as a solution
that might be useful if the situation arises in some large code base.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#28352

From"BartC" <bc@freeuk.com>
Date2012-11-18 22:06 +0000
Message-ID<e%cqs.230864$g62.170308@fx06.am4>
In reply to#28345
"fir" <profesor.fir@gmail.com> wrote in message 
news:95e6588e-0464-4e23-b18f-c88ee17a6f94@googlegroups.com...
> W dniu niedziela, 18 listopada 2012 21:10:33 UTC+1 użytkownik Eric Sosman 
> napisał:

>
>>      In short, "stupidity" is "whatever offends fir's delicate
>>
>> aesthetic sensibilities."

> It would be hard to explain such basic
> things why
>
> coinst int table_max = 4096;
>
> is better than
>
> enum { table_max = 4096 }

I can see exactly why the use of enum doesn't seem satisfactory (being 
designed for a different purpose, for a start).

But neither is 'const int' much better, defining an int *variable* not a 
value, which by some luck happens to be usable as a compile-time value.

For some inexplicable reason, the designers of C could find no use for a 
construct such as:

 constant int abc = 8192;
 constant double xyz = 60.7796;

whose values are *guaranteed* to be always what they say, where the names 
obey normal scoping rules, and which was part of plenty of other languages.

However if you are offended by such things as enums and defines, then 
there's a lot worse in the language!

C is pretty ancient and is not going to change dramatically any time soon.

-- 
Bartc 

[toc] | [prev] | [next] | [standalone]


#28359

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2012-11-18 23:44 +0000
Message-ID<0.b327679ae059c7cdb53a.20121118234420GMT.878v9ybhnv.fsf@bsb.me.uk>
In reply to#28352
"BartC" <bc@freeuk.com> writes:
<snip>
> For some inexplicable reason, the designers of C could find no use for
> a construct such as:
>
> constant int abc = 8192;
> constant double xyz = 60.7796;

Of course they could see a use for such a thing, but that's not a good
way to design anything.  At the very least you must decide if the
benefit is worth the cost.

If the objective had been to face the criticism of CS types 40 years
later, then C would have been a very different language, but it's goals
were narrow.  In that sense, C is a victim of its success.

Because the target machines were quite small, the design method was
(roughly speaking) to add just enough type information to a typeless
language like B or BCPL to allow array indexing and struct accesses of
non word sized units.  You also get simplified arithmetic because the
type lets you know what kind of + to use.

To keep the compiler small, the decisions were (I imagine) not whether
there is a use for this or that but whether there is any way to do
without it.  Macros provide a lot features for very little code, and
they give you named constants for free.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#28364

From"BartC" <bc@freeuk.com>
Date2012-11-19 01:16 +0000
Message-ID<vMfqs.537178$Rc7.100570@fx04.am4>
In reply to#28359
"Ben Bacarisse" <ben.usenet@bsb.me.uk> wrote in message
news:0.b327679ae059c7cdb53a.20121118234420GMT.878v9ybhnv.fsf@bsb.me.uk...
> "BartC" <bc@freeuk.com> writes:

>> For some inexplicable reason, the designers of C could find no use for
>> a construct such as:
>>
>> constant int abc = 8192;
>> constant double xyz = 60.7796;

> To keep the compiler small, the decisions were (I imagine) not whether
> there is a use for this or that but whether there is any way to do
> without it.  Macros provide a lot features for very little code, and
> they give you named constants for free.

I've remarked before that I believe the development of C has been held back
*because* of it's macro language.

Whenever any change or enhancement is proposed, there is usually some way to
achieve the same with a macro. Usually not very elegantly either!

-- 
Bartc 

[toc] | [prev] | [next] | [standalone]


#28353

FromKeith Thompson <kst-u@mib.org>
Date2012-11-18 14:20 -0800
Message-ID<ln6252h7sv.fsf@nuthaus.mib.org>
In reply to#28345
fir <profesor.fir@gmail.com> writes:
[...]
> When I wrote some messages on this group (not many times that was my
> third visit here) really I often met a ppl which I see try to make
> 'much effort to not understand me' (Really, I see suc thing here)
>
> It would be hard to explain such basic things why
>
> coinst int table_max = 4096;
>
> is better than 
>
> enum { table_max = 4096 }
>
> (this reason is not purely aesthetic but i meant that giving up with
> const ints here and go intu enums would be terrible aesthetic failure
> for me) Seem terribly obvious for me, and not seeing it end using
> enums here seem to be very stupid for me

In my opinion, the difference *is* purely esthetic (apart from the
fact that the "const" version doesn't work in C).

I guess that English is not your first language, so perhaps you're
not aware that the word "stupid" is quite insulting.  I suggest
not using it in a technical discussion like this.  (No offense;
your English is certainly better than my own nonexistent Polish.)

Despite the similarity of the words "const" and "constant",
they're really not the same thing in C.  A "constant expression"
is, roughly, an expression that can be evaluated at compile time,
and that can be used where you'd use a literal constant like 42.
(I say "roughly" because the language defines which expressions
are to be treated as constant expressions; there are expressions
that a particular compiler *can* evaluate at compile time that
don't qualify.  It's necessary to have a consistent definition for
all compilers; the set of constant expressions doesn't expand as
compilers become more clever.)

The keyword "const", on the other hand, really means "read-only";
it means that an object's value may not be modified after it's been
created and initialized.  For example, this:

    const time_t now = time(NULL);
    srand(now);
    const int r = rand();

is perfectly valid, even though the compiler cannot possibly
determine the values of "now" and "r" before the program executes.
It just means that, for example, "r++" is not allowed.

C++ has added a special-case rule, that if an object is declared
"const" (read-only), and its initialization is a constant expression,
then the object's name can be used as a constant expression.
(I'm probably not stating the rule *quite* correctly, but that's
close enough.)

> defines are not such stupid but preprocesor can be consideren not as
> part of c but some external tool to use over it (it was initialy
> considered like that, check out c history note) and i also treat it
> such way (as external tool over c, with not to much use for me
> personally)

Any program that uses any header (<stdio.h>, <stdlib.h>, etc.) must
use the preprocessor.  The preprocessor is absolutely part of the
language; it's defined that way by the ISO C standard.  You can't
avoid it.  If you dislike the preprocessor that much, perhaps you'd
prefer some other language.

[...]

You'd like C to permit the name of a const-defined object as a
constant expression, as C does.  I think most of us agree with you.
But the plain fact is that C doesn't support that, and it's not
going to any time soon.

You have two and only two options:
1. Use C.
2. Don't use C.

Make your choice and move on.

-- 
Keith Thompson (The_Other_Keith) kst-u@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"

[toc] | [prev] | [next] | [standalone]


#28357

Fromfir <profesor.fir@gmail.com>
Date2012-11-18 15:33 -0800
Message-ID<59fc7aec-db2e-4ad5-8b38-fa5850a94dd8@googlegroups.com>
In reply to#28353
W dniu niedziela, 18 listopada 2012 23:20:51 UTC+1 użytkownik Keith Thompson napisał:
> 
[skip]
> 
> Make your choice and move on.
> 

Can add one thing - I wrote about this 
shocking thing that I cannot use const int 
with array definietion (this disability is quite shocking and unpleasanyt for me) 

How can it (it is parametrization of array sizes) be done in other general ways is yet
different question (but do not matter now, I
rethink it and maybe write on it l8r)

[toc] | [prev] | [next] | [standalone]


Page 5 of 12 — ← Prev page 1 … 3 4 [5] 6 7 … 12  Next page →

Back to top | Article view | comp.lang.c


csiph-web