Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #402647 > unrolled thread
| Started by | Lawrence D’Oliveiro <ldo@nz.invalid> |
|---|---|
| First post | 2026-10-03 08:43 +0000 |
| Last post | 2026-10-13 23:19 +0100 |
| Articles | 20 on this page of 296 — 21 participants |
Back to article view | Back to comp.lang.c
Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-03 08:43 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-03 11:24 +0100
Re: Taming The Switch-Statement Kaz Kylheku <046-301-5902@kylheku.com> - 2026-10-05 22:15 +0000
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-03 14:22 +0200
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-03 18:02 +0200
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-04 00:24 +0800
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-03 17:36 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-03 16:31 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-04 10:23 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-04 12:18 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-04 16:20 +0200
Re: Taming The Switch-Statement Kaz Kylheku <046-301-5902@kylheku.com> - 2026-10-05 21:34 +0000
Re: Taming The Switch-Statement "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-10-06 16:04 -0700
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-04 16:18 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-04 16:09 +0100
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-04 16:59 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-04 18:30 +0100
Re: Taming The Switch-Statement Richard Harnden <richard.nospam@gmail.invalid> - 2026-10-04 19:49 +0100
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-04 20:35 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-04 22:27 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-04 22:47 +0100
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-04 21:59 +0000
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-04 23:38 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-05 01:24 +0100
Re: Taming The Switch-Statement Kaz Kylheku <046-301-5902@kylheku.com> - 2026-10-05 21:48 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-06 00:11 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-06 09:49 +0200
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-06 11:12 +0200
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-06 12:41 +0200
Re: Taming The Switch-Statement Richard Harnden <richard.nospam@gmail.invalid> - 2026-10-06 12:33 +0100
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-06 15:16 +0100
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-06 14:37 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-06 17:27 +0100
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-06 23:14 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-07 01:25 +0100
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-07 04:19 +0000
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-07 06:28 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-07 11:39 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-07 12:57 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-07 11:32 +0100
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-07 15:10 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-07 19:41 +0100
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-08 04:49 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-08 12:24 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-07 09:07 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-07 11:49 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-07 13:11 +0200
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-06 16:17 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-06 15:32 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-06 17:25 +0200
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-06 14:39 +0000
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-06 19:48 +0200
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-06 18:12 +0000
[OT] substances (was Re: Taming The Switch-Statement) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-06 21:50 +0200
Re: Taming The Switch-Statement "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-10-06 17:06 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-06 19:25 +0200
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-07 10:28 +0200
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-07 15:16 +0200
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-07 16:40 +0200
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-08 07:24 -0700
Re: Taming The Switch-Statement "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-10-06 16:08 -0700
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-06 23:45 +0000
Re: Taming The Switch-Statement "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-10-06 17:08 -0700
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-07 10:35 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-06 12:33 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-06 17:16 +0200
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-06 16:41 -0700
Re: Taming The Switch-Statement tTh <tth@none.invalid> - 2026-10-06 12:14 +0200
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-06 12:43 +0200
Re: Taming The Switch-Statement Jim Jackson <jj@franjam.org.uk> - 2026-10-06 11:47 +0000
Re: Taming The Switch-Statement "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-10-06 16:05 -0700
Re: Taming The Switch-Statement Kaz Kylheku <046-301-5902@kylheku.com> - 2026-10-07 00:42 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-07 13:52 +0100
Re: Taming The Switch-Statement "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-10-07 14:06 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-07 23:31 +0100
Re: Taming The Switch-Statement Kaz Kylheku <046-301-5902@kylheku.com> - 2026-10-05 21:32 +0000
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-06 06:07 +0800
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-05 16:42 -0700
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-05 18:05 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-06 09:04 +0200
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-06 04:11 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-06 21:40 +0200
Re: Taming The Switch-Statement Andrey Tarasevich <noone@noone.net> - 2026-10-06 00:59 -0700
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-06 08:16 +0000
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-06 04:21 -0700
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-06 14:43 +0000
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-06 17:36 +0200
Re: Taming The Switch-Statement Andrey Tarasevich <noone@noone.net> - 2026-10-06 20:36 -0700
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-04 00:20 +0800
Re: Taming The Switch-Statement Andrey Tarasevich <noone@noone.net> - 2026-10-04 09:05 -0700
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-04 23:44 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-05 01:46 +0100
Re: Taming The Switch-Statement Andrey Tarasevich <noone@noone.net> - 2026-10-04 20:48 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-05 06:24 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-05 11:09 +0100
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-06 05:22 +0800
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-06 05:26 +0800
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-10 00:25 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-10 01:58 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-09 19:17 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-10 11:53 +0100
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-10 14:01 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-10 14:11 +0100
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-10 21:34 +0800
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-10 21:58 +0800
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-10 17:50 +0200
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-11 05:52 +0000
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-11 21:16 +0000
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-11 23:38 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 11:58 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-11 14:42 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 14:39 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-11 15:35 -0700
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-11 14:42 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 17:23 +0100
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-11 17:48 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 19:10 +0100
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-12 07:01 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 16:41 +0100
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-10 20:08 +0200
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-10 22:02 +0300
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-10 19:03 +0000
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-10 22:29 +0300
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-10 21:55 +0200
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-10 23:03 +0300
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-10 22:33 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-10 21:53 +0100
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-10 23:16 +0200
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-11 15:29 +0000
Re: Taming The Switch-Statement Andrey Tarasevich <noone@noone.net> - 2026-10-10 15:30 -0700
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-10 22:58 +0000
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-11 09:09 +0800
Re: Taming The Switch-Statement ram@zedat.fu-berlin.de (Stefan Ram) - 2026-10-11 10:14 +0000
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-11 21:12 +0000
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-11 03:58 +0200
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-10 15:32 -0700
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-11 01:58 +0300
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 01:43 +0100
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-11 09:12 +0800
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-11 04:07 +0200
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-10 20:13 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-11 10:36 +0200
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-11 04:26 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 13:35 +0100
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-11 06:13 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 14:51 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-11 15:33 +0200
Re: Taming The Switch-Statement Andrey Tarasevich <noone@noone.net> - 2026-10-11 09:01 -0700
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-11 19:17 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 18:57 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-11 14:28 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 23:02 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-11 16:29 -0700
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-12 04:03 -0700
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-12 22:02 +0300
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-12 21:09 +0200
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-12 22:31 +0300
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-12 22:32 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 22:05 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-12 23:14 +0200
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-13 07:23 +0000
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-13 12:12 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 11:26 +0100
Re: Taming The Switch-Statement Richard Harnden <richard.nospam@gmail.invalid> - 2026-10-13 12:10 +0100
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-13 06:55 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-13 13:33 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 13:41 +0100
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-13 14:38 +0000
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-13 18:04 +0200
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-13 20:52 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 22:24 +0100
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-14 00:03 +0200
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-14 10:53 +0000
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-14 17:54 +0200
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-14 19:48 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 11:16 +0100
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-13 21:54 +0000
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-13 07:40 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 16:46 +0100
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-13 09:10 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 18:15 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-13 18:27 -0700
Re: Taming The Switch-Statement gazelle@shell.xmission.com (Kenny McCormack) - 2026-10-14 01:50 +0000
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-14 10:58 +0000
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-13 22:54 +0300
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-13 16:45 -0700
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-13 18:34 -0700
Re: Taming The Switch-Statement Kaz Kylheku <046-301-5902@kylheku.com> - 2026-10-14 05:17 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-14 13:46 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-12 07:05 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 14:37 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-12 16:12 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 16:32 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-12 19:05 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 19:15 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-12 16:43 -0700
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-12 16:45 -0700
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-12 23:46 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 00:56 +0100
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-12 17:58 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 20:38 +0100
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-12 19:52 +0000
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-12 22:56 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 21:57 +0100
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-12 21:21 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 22:46 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-13 09:27 +0200
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-13 12:18 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 11:33 +0100
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-13 00:25 +0300
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-12 22:20 +0000
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-12 17:02 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 01:53 +0100
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-13 03:54 +0200
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-13 10:52 +0000
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-13 23:16 +0300
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-13 18:44 -0700
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-12 17:33 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-14 00:21 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-13 20:40 -0700
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-14 03:59 +0000
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-13 21:35 -0700
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-14 11:27 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-14 12:17 +0100
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-14 12:38 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-14 16:49 +0100
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-14 19:30 +0000
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-14 23:28 +0300
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-14 21:30 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-14 21:56 +0100
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-14 21:59 +0100
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-15 01:26 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-15 12:01 +0100
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-15 11:45 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-15 15:57 +0100
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-15 18:10 +0100
Re: Taming The Switch-Statement Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-10-15 05:17 -0700
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-15 14:37 +0000
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-15 20:50 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-15 19:59 +0100
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-14 18:51 +0100
Re: Taming The Switch-Statement "Peyton" <peyton@solacium.com> - 2026-10-14 11:04 -0700
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-14 19:47 +0000
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-14 13:58 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-15 12:08 +0200
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-14 14:23 -0700
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-14 14:35 +0000
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-10 16:38 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-10 21:09 +0100
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-10 23:14 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-10 23:01 +0100
Re: Taming The Switch-Statement antispam@fricas.org (Waldek Hebisch) - 2026-10-11 08:00 +0000
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-11 10:27 +0200
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-11 10:49 +0200
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-10 16:30 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 02:12 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-10 19:55 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-11 11:00 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 12:21 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-11 14:04 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 23:05 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-12 07:22 +0200
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 11:42 +0100
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-12 16:15 +0200
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-12 14:34 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 16:47 +0100
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-13 00:15 +0800
Re: Taming The Switch-Statement ram@zedat.fu-berlin.de (Stefan Ram) - 2026-10-12 17:02 +0000
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-13 20:04 +0800
Re: Taming The Switch-Statement ram@zedat.fu-berlin.de (Stefan Ram) - 2026-10-13 17:28 +0000
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-14 02:05 +0800
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-12 17:17 +0000
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-12 17:37 +0000
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-12 17:34 +0000
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-12 18:46 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-12 19:52 +0100
Re: Taming The Switch-Statement scott@slp53.sl.home (Scott Lurndal) - 2026-10-12 19:42 +0000
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-12 16:29 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 00:53 +0100
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-12 18:14 -0700
Re: Taming The Switch-Statement cross@spitfire.i.gajendra.net (Dan Cross) - 2026-10-12 22:35 +0000
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-12 16:14 -0700
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-11 22:36 +0100
Re: Taming The Switch-Statement gazelle@shell.xmission.com (Kenny McCormack) - 2026-10-10 13:14 +0000
Re: Taming The Switch-Statement Michael S <already5chosen@yahoo.com> - 2026-10-10 19:50 +0300
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-10 20:13 +0200
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-10 15:54 -0700
Re: Taming The Switch-Statement Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-10-11 03:41 +0200
Re: Taming The Switch-Statement Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-10-11 09:51 +0800
Re: Taming The Switch-Statement David Brown <david.brown@hesbynett.no> - 2026-10-11 11:41 +0200
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-10 16:44 -0700
Re: Taming The Switch-Statement Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-10-10 16:56 -0700
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-11 21:26 +0000
Re: Taming The Switch-Statement Jon Ribbens <jon+usenet@unequivocal.eu> - 2026-10-11 22:12 +0000
Re: Taming The Switch-Statement Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-10-13 22:00 +0000
Re: Taming The Switch-Statement bart <bc@freeuk.com> - 2026-10-13 23:19 +0100
Page 14 of 15 — ← Prev page 1 … 12 13 [14] 15 Next page →
| From | bart <bc@freeuk.com> |
|---|---|
| Date | 2026-10-11 23:05 +0100 |
| Message-ID | <11ah16h$320sj$2@dont-email.me> |
| In reply to | #403002 |
On 11/10/2026 22:04, Keith Thompson wrote: > bart <bc@freeuk.com> writes: >> On 11/10/2026 03:55, Keith Thompson wrote: >>> bart <bc@freeuk.com> writes: >>>> On 11/10/2026 00:30, Keith Thompson wrote: >>>>> bart <bc@freeuk.com> writes: >>>> >>>>> Huh? "computed goto" is not a looping construct. >>>> >>>> You only hear about it in the context of interpreter dispatch loops. >> >>>>> Yes, of course it does. Did you think that a construct that's used >>>>> in most existing C programs could just be removed from the language? >>>> >>>> I didn't say they should be removed. >>> So you want to add a new and less flexible looping construct on top >>> of the existing one, >> >> So how would you do it: remove existing switch completely and replace >> with the new version? > > No, I'd leave it alone. > > C's switch statement is, like C as a whole, "quirky, flawed, and > an enormous success" (Dennis Ritchie said that). Yeah, like anyone had a choice in the matter! > You want to add a new construct that differs from switch only in > that it doesn't have implicit fallthrough. You think the existence > of fallthrough behavior, or of any flexibility that you see as > excessive, is a problem that needs to be fixed. I don't. So you don't really get it. That's fine.
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2026-10-12 07:22 +0200 |
| Message-ID | <11ahqpu$38ir0$3@dont-email.me> |
| In reply to | #403010 |
On 12/10/2026 00:05, bart wrote: > On 11/10/2026 22:04, Keith Thompson wrote: >> bart <bc@freeuk.com> writes: >>> On 11/10/2026 03:55, Keith Thompson wrote: >>>> bart <bc@freeuk.com> writes: >>>>> On 11/10/2026 00:30, Keith Thompson wrote: >>>>>> bart <bc@freeuk.com> writes: >>>>> >>>>>> Huh? "computed goto" is not a looping construct. >>>>> >>>>> You only hear about it in the context of interpreter dispatch loops. >>> >>>>>> Yes, of course it does. Did you think that a construct that's used >>>>>> in most existing C programs could just be removed from the language? >>>>> >>>>> I didn't say they should be removed. >>>> So you want to add a new and less flexible looping construct on top >>>> of the existing one, >>> >>> So how would you do it: remove existing switch completely and replace >>> with the new version? >> >> No, I'd leave it alone. >> >> C's switch statement is, like C as a whole, "quirky, flawed, and >> an enormous success" (Dennis Ritchie said that). > > Yeah, like anyone had a choice in the matter! There are /no/ programming languages that are successful, but not "quirky and flawed" - though there will always be differing opinions on what aspects are "quirky", and what aspects are "flawed". As long as there is more than one person involved, writing code in more than one way for more than one task, this is inevitable. The conflicts you have with people here do not stem from the quirks or flaws that you see in the C language. They stem from your totally unjustified belief that others do not see C as quirky and flawed - your arrogant and megalomanic belief that you alone see its quirks and flaws, and that you alone can "fix" them. The rest of us know that C is a very successful language, and can use it to write good and useful code. Some people here write in C because they like the language, some because it is the only language they can use (for one of many possible reasons). I have never met a C programmer who does not think the language would have been better with certain changes - but I have never met a programmer of /any/ language who does not have ideas about how the language could have been better for their use. > >> You want to add a new construct that differs from switch only in >> that it doesn't have implicit fallthrough. You think the existence >> of fallthrough behavior, or of any flexibility that you see as >> excessive, is a problem that needs to be fixed. I don't. > > So you don't really get it. That's fine. > So now you can drop it, along with all your other complaints about the C language and tools people use with it? Alternatively, you are free to write proposals for the C standards committee, or take part in their discussions, aiming to actually change the things you so passionately insist need fixing.
[toc] | [prev] | [next] | [standalone]
| From | bart <bc@freeuk.com> |
|---|---|
| Date | 2026-10-12 11:42 +0100 |
| Message-ID | <11aidi3$3gbu4$1@dont-email.me> |
| In reply to | #403026 |
On 12/10/2026 06:22, David Brown wrote:
> On 12/10/2026 00:05, bart wrote:
>> So you don't really get it. That's fine.
>>
>
> So now you can drop it, along with all your other complaints about the C
> language and tools people use with it?
My opinions haven't changed at all. KT doesn't care because he doesn't
understand the importance of having properly designed features. Probably
he hasn't been involved in having to process somebody else's source code
or having to translate it or port it.
I have an old tool which /visualises/ C source code by trying to express
it in my syntax. It is not a formal transpiler: the semantics are not
translated, just the shape of the code.
Still, the transformation is usually startlingly clear compared with the
original. Anyway I applied it to two examples, first:
switch (a) {
case 1: 10; break;
case 2: 20; break;
default: 30;
}
The output is:
switch a
when 1 then
10
when 2 then
20
else
30
end
Notice there are no breaks (which don't exist in my syntax). This is the
second:
switch (a) {
default:
if (b) {
case 1: 10; break;
case 2: 20; break;
}
}
The ") {" had to present as the tool requires the switch body to be a
compound statement. The output is:
switch a
else
if b then
end
end
This generated error messages about case-statement not being supported
(being out of place).
But it doesn't look right does it?. Maybe a better version could express
switch using gotos and arrays of label-pointers, but this would be
disastrous for examples like the first.
I then tried Duff's example for fun, and it produced this:
switch count rem 8
when 0 then
to^ := (from++)^
fallthrough
when 7 then
to^ := (from++)^
fallthrough
when 6 then
to^ := (from++)^
fallthrough
when 5 then
to^ := (from++)^
fallthrough
when 4 then
to^ := (from++)^
fallthrough
when 3 then
to^ := (from++)^
fallthrough
when 2 then
to^ := (from++)^
fallthrough
when 1 then
to^ := (from++)^
end
I'm surprised that it detected fall-through, but probably only in the
simplest cases (non-empty block not ending in 'break').
'fallthrough' doesn't exist in my syntax so here it must just be a hint.
> Alternatively, you are free to write proposals for the C standards
> committee, or take part in their discussions, aiming to actually change
> the things you so passionately insist need fixing.
I'll be long dead before anything happens. It's taken most of my
lifetime before even a no-brainer like binary literals became official.
[toc] | [prev] | [next] | [standalone]
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Date | 2026-10-12 16:15 +0200 |
| Message-ID | <11aiq1l$3kr94$2@dont-email.me> |
| In reply to | #403029 |
On 12/10/2026 12:42, bart wrote: > On 12/10/2026 06:22, David Brown wrote: >> On 12/10/2026 00:05, bart wrote: > >>> So you don't really get it. That's fine. >>> >> >> So now you can drop it, along with all your other complaints about the >> C language and tools people use with it? > > My opinions haven't changed at all. KT doesn't care because he doesn't > understand the importance of having properly designed features. Probably > he hasn't been involved in having to process somebody else's source code > or having to translate it or port it. > Again, I am not responsible for other people's posts - but I am entirely confident that Keith appreciates well-designed programming languages. And I am entirely confident that he was a lot of experience dealing with other people's code. > >> Alternatively, you are free to write proposals for the C standards >> committee, or take part in their discussions, aiming to actually >> change the things you so passionately insist need fixing. > I'll be long dead before anything happens. It's taken most of my > lifetime before even a no-brainer like binary literals became official. That is perhaps because the people involved with the C language not only /have/ brains, but they also use them.
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2026-10-12 14:34 +0000 |
| Message-ID | <td6zS.60653$jNL6.31326@fx12.iad> |
| In reply to | #403029 |
bart <bc@freeuk.com> writes: >On 12/10/2026 06:22, David Brown wrote: >> On 12/10/2026 00:05, bart wrote: > >>> So you don't really get it. That's fine. >>> >> >> So now you can drop it, along with all your other complaints about the C >> language and tools people use with it? > >My opinions haven't changed at all. KT doesn't care because he doesn't >understand the importance of having properly designed features. "properly designed" by what criteria? Making you happy is not a valid criteria.
[toc] | [prev] | [next] | [standalone]
| From | bart <bc@freeuk.com> |
|---|---|
| Date | 2026-10-12 16:47 +0100 |
| Message-ID | <11aivdn$3nvmh$1@dont-email.me> |
| In reply to | #403035 |
On 12/10/2026 15:34, Scott Lurndal wrote: > bart <bc@freeuk.com> writes: >> On 12/10/2026 06:22, David Brown wrote: >>> On 12/10/2026 00:05, bart wrote: >> >>>> So you don't really get it. That's fine. >>>> >>> >>> So now you can drop it, along with all your other complaints about the C >>> language and tools people use with it? >> >> My opinions haven't changed at all. KT doesn't care because he doesn't >> understand the importance of having properly designed features. > > "properly designed" by what criteria? > > Making you happy is not a valid criteria. Is there any language that you would consider badly designed? If so, what would you do if it become amazingly popular and you were obliged to deal with it in your work; would you change your mind, or would you still think it was poor? Hopefully the latter. But back to C: this is how 'switch' is defined in the grammar: 'switch' ( expression ) statement Notice no mention of 'case' or 'default' statements! Is that not a giant red flag, that there is normal shape to switch-statement syntax?
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-10-13 00:15 +0800 |
| Message-ID | <dI7zS.10223$AEj4.10181@fx17.ams4> |
| In reply to | #403038 |
On 10/12/2026 11:47 PM, bart wrote: > On 12/10/2026 15:34, Scott Lurndal wrote: >> bart <bc@freeuk.com> writes: >>> On 12/10/2026 06:22, David Brown wrote: >>>> On 12/10/2026 00:05, bart wrote: >>> >>>>> So you don't really get it. That's fine. >>>>> >>>> >>>> So now you can drop it, along with all your other complaints about >>>> the C >>>> language and tools people use with it? >>> >>> My opinions haven't changed at all. KT doesn't care because he doesn't >>> understand the importance of having properly designed features. >> >> "properly designed" by what criteria? >> >> Making you happy is not a valid criteria. > > Is there any language that you would consider badly designed? > > If so, what would you do if it become amazingly popular and you were > obliged to deal with it in your work; would you change your mind, or > would you still think it was poor? > > Hopefully the latter. > > But back to C: this is how 'switch' is defined in the grammar: > > 'switch' ( expression ) statement > > Notice no mention of 'case' or 'default' statements! > > Is that not a giant red flag, that there is normal shape to switch- > statement syntax? Not to me. A giant red flag would be something akin to switch ( foo ) printf( "Hello, bart\n" ) ; where the printf() never gets called. Best wishes, and happy red flags! -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:; Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
[toc] | [prev] | [next] | [standalone]
| From | ram@zedat.fu-berlin.de (Stefan Ram) |
|---|---|
| Date | 2026-10-12 17:02 +0000 |
| Message-ID | <flag-20261012180101@ram.dialup.fu-berlin.de> |
| In reply to | #403039 |
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote or quoted:
>Not to me. A giant red flag would be something akin to
> switch ( foo ) printf( "Hello, bart\n" ) ;
>where the printf() never gets called.
GCC also flags it:
main.c: In function 'main':
main.c:3:30: warning: statement will never be executed [-Wswitch-unreachable]
3 | int main( void ){ switch( 0 )printf( "Hello!\n" ); }
| ^~~~~~~~~~~~~~~~~~~~
. I use, " . . . -pedantic . . . -Wall -W -Wextra -Wpedantic . . .".
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-10-13 20:04 +0800 |
| Message-ID | <M7pzS.141305$wun8.135843@fx13.ams4> |
| In reply to | #403040 |
On 10/13/2026 1:02 AM, Stefan Ram wrote:
> Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote or quoted:
>> Not to me. A giant red flag would be something akin to
>> switch ( foo ) printf( "Hello, bart\n" ) ;
>> where the printf() never gets called.
>
> GCC also flags it:
>
> main.c: In function 'main':
> main.c:3:30: warning: statement will never be executed [-Wswitch-unreachable]
> 3 | int main( void ){ switch( 0 )printf( "Hello!\n" ); }
> | ^~~~~~~~~~~~~~~~~~~~
>
> . I use, " . . . -pedantic . . . -Wall -W -Wextra -Wpedantic . . .".
You're right. And a quick and immediate silence follows if we simply
transpose the printf() and 0, as follows.
signed main( void ){ switch( printf( "Hello!\n" ) ) break ; }
We could call this refactoring maneuver /switch castle/, after the cas-
tle movement in chess.
Now GCC does /not/ complain about a useless break, unlike bart [1].
But isn't that a bug in GCC? Shouldn't a useless break have the same
diagnostic as a bypassed printf()? Like an idiotic journalist, I ask
/inquiring minds want to know/?
Best wishes, and happy /switch castle/ refactoring adventures.
[1] Or was bart complaining that the break was /not/ useless, and com-
pulsory. I'm getting a bit confused trying to follow the argument, but
it's really popcorn worthy, and I guess I'll have to order industrial
amount of it next time this comes up.
--
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
[toc] | [prev] | [next] | [standalone]
| From | ram@zedat.fu-berlin.de (Stefan Ram) |
|---|---|
| Date | 2026-10-13 17:28 +0000 |
| Message-ID | <tidy-20261013182719@ram.dialup.fu-berlin.de> |
| In reply to | #403099 |
Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote or quoted:
> signed main( void ){ switch( printf( "Hello!\n" ) ) break ; }
. . .
>Now GCC does /not/ complain about a useless break, unlike bart [1].
>But isn't that a bug in GCC?
With "-Wswitch-default", gcc will note that there is no "default".
One can apply "clang-tidy" to that code to get,
. . .
|main.c:3:55: warning: 'break' will never be executed
|signed main( void ){ switch( printf( "Hello!\n" ) ) break ; }
| ^
|main.c:3:55: warning: This statement is never executed
|signed main( void ){ switch( printf( "Hello!\n" ) ) break ; }
| ^
|main.c:3:55: note: This statement is never executed
|signed main( void ){ switch( printf( "Hello!\n" ) ) break ; }
| ^
. . .
, but "clang-tidy" actually is intended for C++, so one will also
get some warnings that do not apply to C programs.
[toc] | [prev] | [next] | [standalone]
| From | Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> |
|---|---|
| Date | 2026-10-14 02:05 +0800 |
| Message-ID | <cquzS.145357$koK3.143660@fx01.ams4> |
| In reply to | #403115 |
On 10/14/2026 1:28 AM, Stefan Ram wrote:
> Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> wrote or quoted:
>> signed main( void ){ switch( printf( "Hello!\n" ) ) break ; }
> . . .
>> Now GCC does /not/ complain about a useless break, unlike bart [1].
>> But isn't that a bug in GCC?
>
> With "-Wswitch-default", gcc will note that there is no "default".
>
> One can apply "clang-tidy" to that code to get,
>
> . . .
> |main.c:3:55: warning: 'break' will never be executed
> |signed main( void ){ switch( printf( "Hello!\n" ) ) break ; }
> | ^
> |main.c:3:55: warning: This statement is never executed
> |signed main( void ){ switch( printf( "Hello!\n" ) ) break ; }
> | ^
> |main.c:3:55: note: This statement is never executed
> |signed main( void ){ switch( printf( "Hello!\n" ) ) break ; }
> | ^
> . . .
>
> , but "clang-tidy" actually is intended for C++, so one will also
> get some warnings that do not apply to C programs.
Thank you. Now posters of comp.lang.c can indeed publish an issue of
the GCC magazine, and file a defect report on the behaviour of the com-
piler in the presence of a wild /break/ statement bound to an unlabelled
switch ().
--
Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | via Easynews.com
https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;
Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2026-10-12 17:17 +0000 |
| Message-ID | <BC8zS.76490$w7wb.36545@fx17.iad> |
| In reply to | #403038 |
bart <bc@freeuk.com> writes: >On 12/10/2026 15:34, Scott Lurndal wrote: >> bart <bc@freeuk.com> writes: >>> On 12/10/2026 06:22, David Brown wrote: >>>> On 12/10/2026 00:05, bart wrote: >>> >>>>> So you don't really get it. That's fine. >>>>> >>>> >>>> So now you can drop it, along with all your other complaints about the C >>>> language and tools people use with it? >>> >>> My opinions haven't changed at all. KT doesn't care because he doesn't >>> understand the importance of having properly designed features. >> >> "properly designed" by what criteria? >> >> Making you happy is not a valid criteria. > >Is there any language that you would consider badly designed? I would prefer that you first describe the specific generic criteria that you believe apply to a "properly designed" language, rather than attempting to change the topic, and then explicitly noting which of those generic criteria are violated by early exits from switch statements in the C language which is the nominal topic for this usenet newsgroup. Please do not reference your personal languages, compilers or opinions.
[toc] | [prev] | [next] | [standalone]
| From | cross@spitfire.i.gajendra.net (Dan Cross) |
|---|---|
| Date | 2026-10-12 17:37 +0000 |
| Message-ID | <11aj5rt$3bd$1@reader2.panix.com> |
| In reply to | #403038 |
In article <11aivdn$3nvmh$1@dont-email.me>, bart <bc@freeuk.com> wrote: >On 12/10/2026 15:34, Scott Lurndal wrote: >> bart <bc@freeuk.com> writes: >>> On 12/10/2026 06:22, David Brown wrote: >>>> On 12/10/2026 00:05, bart wrote: >>> >>>>> So you don't really get it. That's fine. >>>>> >>>> >>>> So now you can drop it, along with all your other complaints about the C >>>> language and tools people use with it? >>> >>> My opinions haven't changed at all. KT doesn't care because he doesn't >>> understand the importance of having properly designed features. >> >> "properly designed" by what criteria? >> >> Making you happy is not a valid criteria. > >Is there any language that you would consider badly designed? Yes. PHP. >If so, what would you do if it become amazingly popular and you were >obliged to deal with it in your work; would you change your mind, or >would you still think it was poor? Fortunately, I am not obliged to deal with PHP, but if I were, I suspect my opinion of it would go down, not up. Regardless, I think it fair to categorize it as, "amazingly popular." - Dan C.
[toc] | [prev] | [next] | [standalone]
| From | cross@spitfire.i.gajendra.net (Dan Cross) |
|---|---|
| Date | 2026-10-12 17:34 +0000 |
| Message-ID | <11aj5nt$t7t$1@reader2.panix.com> |
| In reply to | #403029 |
In article <11aidi3$3gbu4$1@dont-email.me>, bart <bc@freeuk.com> wrote: >On 12/10/2026 06:22, David Brown wrote: >> On 12/10/2026 00:05, bart wrote: > >>> So you don't really get it. That's fine. >>> >> >> So now you can drop it, along with all your other complaints about the C >> language and tools people use with it? > >My opinions haven't changed at all. KT doesn't care because he doesn't >understand the importance of having properly designed features. Probably >he hasn't been involved in having to process somebody else's source code >or having to translate it or port it. I think you're free to criticize the language, if you like. But you are not free to assign to others opinions that they may not hold; at least if you intend to be taken seriously. I kinda sorta agree that requiring `break` between `case` statements in C was an historical mistake, but here we are: it is 2026, and the language has done that for more than 50 years now. The ship for changing it has sailed. What is one left to do, besides acknowledging it as a wart on the face of the langauge? Everyone here knows that C is imperfect; everyone knows that if one were starting from scratch now, given the hindsight of 50+ years, one would do things differently. So what? We're not starting from scratch, the language we have is the language that we have, and there are real-world complexities that make it difficult (at best!) to change. Simply put, no one is suggesting that C is perfect, but people are saying that one can live with it. I don't read Keith trying to defend C here so much as simply explain what it does, and how one works around the complaints about it that you identify. >I have an old tool which /visualises/ C source code by trying to express >it in my syntax. It is not a formal transpiler: the semantics are not >translated, just the shape of the code. > >Still, the transformation is usually startlingly clear compared with the >original. Anyway I applied it to two examples, first: > >[snip] So what? What do you think that that shows? That your language doesn't have `break`? Ok, but you already knew that, right? We have it on your authority that it is true, so we know that, too. But why does it matter? I find such arguments strange, as they're not really arguing anything meaningful. It's like Anton Ertl's complaint about Rust vis binary search trees in `comp.arch`: because he did not write his tree implementation using completely safe Rust _the same way he did in C_, then somehow Rust is deficient; but Rust is a different programming language, with different semantics and different constraints about how objects may be referred to, etc. That the structure of a program in two different programming languages with different semantics is different seems axiomatic, and frankly doesn't say much about the language. So it is here, as well. You can fairly say, "I don't like this" about something in C; that's fine. Others may even agree with you. But C is what it is, and unless you're willing to engage with the committee and larger language community to change it (which is going to be very, very hard; buckle up) then that is all that it will be. - Dan C.
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2026-10-12 18:46 +0000 |
| Message-ID | <5W9zS.161421$98z8.84067@fx33.iad> |
| In reply to | #403043 |
cross@spitfire.i.gajendra.net (Dan Cross) writes: >In article <11aidi3$3gbu4$1@dont-email.me>, bart <bc@freeuk.com> wrote: >>On 12/10/2026 06:22, David Brown wrote: >>> On 12/10/2026 00:05, bart wrote: >> >I kinda sorta agree that requiring `break` between `case` >statements in C was an historical mistake, but here we are: it >is 2026, and the language has done that for more than 50 years >now. The ship for changing it has sailed. What is one left to >do, besides acknowledging it as a wart on the face of the >langauge? I, on the other hand, don't consider it a mistake, in the context of the C and C++ languages. I've used the ability to fall through in a significant fraction (50% in some applications) of the switch statements that I've written over the last five decades of C and C++programming. Absent other changes to the syntax (e.g. non-contiguous ranges in the case selector[*]) the requirement to use break to avoid falling through to other cases is rather valuable to me. [*] I also use the gcc extension supporting contiguous ranges heavily.
[toc] | [prev] | [next] | [standalone]
| From | bart <bc@freeuk.com> |
|---|---|
| Date | 2026-10-12 19:52 +0100 |
| Message-ID | <11ajaa1$3ssqg$1@dont-email.me> |
| In reply to | #403048 |
On 12/10/2026 19:46, Scott Lurndal wrote: > cross@spitfire.i.gajendra.net (Dan Cross) writes: >> In article <11aidi3$3gbu4$1@dont-email.me>, bart <bc@freeuk.com> wrote: >>> On 12/10/2026 06:22, David Brown wrote: >>>> On 12/10/2026 00:05, bart wrote: >>> > >> I kinda sorta agree that requiring `break` between `case` >> statements in C was an historical mistake, but here we are: it >> is 2026, and the language has done that for more than 50 years >> now. The ship for changing it has sailed. What is one left to >> do, besides acknowledging it as a wart on the face of the >> langauge? > > I, on the other hand, don't consider it a mistake, in the > context of the C and C++ languages. I've used the ability to > fall through in a significant fraction (50% in some applications) of > the switch statements that I've written over the last > five decades of C and C++programming. So 99% of programmers have to suffer needing to pointlessly write 'break' everywhere, rather than the 1% having to write 'fallthru'. Although it sounds like even you need fall-through less often than break.
[toc] | [prev] | [next] | [standalone]
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Date | 2026-10-12 19:42 +0000 |
| Message-ID | <KKazS.183759$ygUb.92831@fx23.iad> |
| In reply to | #403049 |
bart <bc@freeuk.com> writes: >On 12/10/2026 19:46, Scott Lurndal wrote: >> cross@spitfire.i.gajendra.net (Dan Cross) writes: >>> In article <11aidi3$3gbu4$1@dont-email.me>, bart <bc@freeuk.com> wrote: >>>> On 12/10/2026 06:22, David Brown wrote: >>>>> On 12/10/2026 00:05, bart wrote: >>>> >> >>> I kinda sorta agree that requiring `break` between `case` >>> statements in C was an historical mistake, but here we are: it >>> is 2026, and the language has done that for more than 50 years >>> now. The ship for changing it has sailed. What is one left to >>> do, besides acknowledging it as a wart on the face of the >>> langauge? >> >> I, on the other hand, don't consider it a mistake, in the >> context of the C and C++ languages. I've used the ability to >> fall through in a significant fraction (50% in some applications) of >> the switch statements that I've written over the last >> five decades of C and C++programming. > >So 99% of programmers have to suffer Please, speak for yourself. You have no clue what programmers[*] think, or whether they suffer from the requirement to use 'break' to avoid falling through to the next case. [*] You, being atypical, are particularly ill-suited to speak for others.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2026-10-12 16:29 -0700 |
| Message-ID | <11ajqhc$28f2$2@kst.eternal-september.org> |
| In reply to | #403049 |
bart <bc@freeuk.com> writes:
[...]
> So 99% of programmers have to suffer needing to pointlessly write
> 'break' everywhere, rather than the 1% having to write 'fallthru'.
We're not suffering.
Speaking for myself, I had to learn *once*, several decades ago,
that each case needs to end with "break;" (unless I want fallthrough
behavior). As I've mentioned here before, I pretend that the "break;"
is part of the syntax of a switch statement, while being aware that
it really isn't.
It's easy, and it doesn't hurt a bit. I'll bet it would be easy
for you if (a) you regularly wrote C code (I don't know how often
you do) and (b) you didn't go out of your way to suffer on other
people's behalf.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
| From | bart <bc@freeuk.com> |
|---|---|
| Date | 2026-10-13 00:53 +0100 |
| Message-ID | <11ajrt0$382u$1@dont-email.me> |
| In reply to | #403070 |
On 13/10/2026 00:29, Keith Thompson wrote:
> bart <bc@freeuk.com> writes:
> [...]
>> So 99% of programmers have to suffer needing to pointlessly write
>> 'break' everywhere, rather than the 1% having to write 'fallthru'.
>
> We're not suffering.
>
I was replying to SL who doesn't think auto-fall-through is a mistake
because he uses it a lot. Even though he says this:
"I've used the ability to fall through in a significant fraction (50% in
some applications) of the switch statements"
So 50% /sometimes/, and not even individual case-blocks, but of those
switch statements which use at least one fall-through, if I read that right.
So even for him, the majority of case-labels do not fall through.
That makes it rather strange to favour the minority case when it would
be more convenient and less typing for everybody, including SL, if it
was the other way around!
> Speaking for myself, I had to learn *once*, several decades ago,
> that each case needs to end with "break;" (unless I want fallthrough
> behavior). As I've mentioned here before, I pretend that the "break;"
> is part of the syntax of a switch statement, while being aware that
> it really isn't.
>
> It's easy, and it doesn't hurt a bit. I'll bet it would be easy
> for you if (a) you regularly wrote C code (I don't know how often
> you do) and (b) you didn't go out of your way to suffer on other
> people's behalf.
>
This is what I suggested in my first reply in the thread:
break; case a: case b:
break; case c:
break; default:;
That is, use 'break; case' for the first case label of a block.
And also:
"Alternately, create a macro like 'endcase' that expands to 'break', for
a more structured appearance."
These are practical workarounds. That 'break; case' was part of a
solution I used for a 20Kloc C application.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Date | 2026-10-12 18:14 -0700 |
| Message-ID | <11ak0lr$28f2$7@kst.eternal-september.org> |
| In reply to | #403074 |
bart <bc@freeuk.com> writes:
> On 13/10/2026 00:29, Keith Thompson wrote:
>> bart <bc@freeuk.com> writes:
>> [...]
>>> So 99% of programmers have to suffer needing to pointlessly write
>>> 'break' everywhere, rather than the 1% having to write 'fallthru'.
>> We're not suffering.
>
> I was replying to SL who doesn't think auto-fall-through is a mistake
> because he uses it a lot.
[...]
And I was replying to your deeply silly claim that 99% of C programmers
"suffer" because we need to use "break" in switch statements.
[...]
> That makes it rather strange to favour the minority case when it would
> be more convenient and less typing for everybody, including SL, if it
> was the other way around!
Sure, it's strange. A small minority of C programmers might prefer
to have fallthrough as the default. The majority, I suspect, *would
have* preferred not to have fallthrough as the default.
Nobody other than you, as far as I can tell, thinks that the strange
choice made several decades ago has led to mass suffering.
[...]
> This is what I suggested in my first reply in the thread:
>
> break; case a: case b:
> break; case c:
> break; default:;
>
> That is, use 'break; case' for the first case label of a block.
Yes, I suppose that would work, but frankly it looks weird. If
you want to use that pattern in your own code, nobody is going to
stop you. It reminds me of "Yoda conditions" (if (42 == x)), an
ugly coding practice that might make it slightly easier to avoid
a certain kind of error.
> And also:
>
> "Alternately, create a macro like 'endcase' that expands to 'break',
> for a more structured appearance."
All C programmers know that "break;" is how you terminate a case
if you don't want fallthrough. A macro that expands to "break"
doesn't help anything. I have to look up the definition to be sure
it's not doing something weird, and it doesn't address any of the
problems you've been complaining about. And of course you still
have to remember that "break" in a switch in a loop doesn't break
out of the loop. It appears to be an attempt to make C look like
some other language, something I've never found to be a good idea.
But again, if you want to use your "endcase" macro, nobody will
stop you.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
[toc] | [prev] | [next] | [standalone]
Page 14 of 15 — ← Prev page 1 … 12 13 [14] 15 Next page →
Back to top | Article view | comp.lang.c
csiph-web