Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: primitive instruction for programming |
| Date | 2015-04-14 15:57 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <87iocykbap.fsf@bsb.me.uk> (permalink) |
| References | (3 earlier) <4cac6561-beab-461c-870b-6cb7e6068292@googlegroups.com> <mgh2mf$fl3$1@dont-email.me> <9195f77a-7a1c-4f93-881c-ba7fcde2e84a@googlegroups.com> <b0815fd7-e03f-46e3-8a05-8d4f8cc038fd@googlegroups.com> <be590bb6-a343-468c-9bcc-ef424139f709@googlegroups.com> |
fmassei@gmail.com writes:
> On Tuesday, April 14, 2015 at 4:11:11 PM UTC+2, Xcott Craver wrote:
>> On Monday, April 13, 2015 at 3:10:07 PM UTC-4, fma...@gmail.com wrote:
>> >
>> > An hint: there is a common, widespread C pattern, used in many occasions,
>> > that can actually change the program flow without the use of any control or
>> > loop keyword.
>>
>> Stack smashing?
>
> Nope.
>
> Ok, I tell you: array of function pointers :)
Why then (if you are permitting function call) did you say "no" to the
&& and || idea?
> 'if' for example:
>
> if (i>0) a();
> else b();
>
> can be written as:
> void(*f[2])(void) = { a, b };
> f[i<=0]();
... and also as the deliciously obscure (void (*[])(void)){a, b}[i<=0]();
Which is
i>0 && (a(), 1) || (b(), 1)
which can be simplified if these "block functions" are not required to
be void.
<snip>
--
Ben.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 00:56 -0700
Re: primitive instruction for programming Richard Heathfield <rjh@cpax.org.uk> - 2015-04-13 09:24 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 01:59 -0700
Re: primitive instruction for programming Richard Heathfield <rjh@cpax.org.uk> - 2015-04-13 10:32 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 02:53 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 11:04 +0100
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-13 14:10 +0200
Re: primitive instruction for programming Emiliano Gomes Padilha <egpadilha@gmail.com> - 2015-04-20 14:27 -0700
Re: primitive instruction for programming Emiliano Gomes Padilha <egpadilha@gmail.com> - 2015-04-20 15:12 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-21 00:17 +0100
Re: primitive instruction for programming Emiliano Gomes Padilha <egpadilha@gmail.com> - 2015-04-22 11:07 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-21 09:04 +0200
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-21 03:02 -0500
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-21 01:34 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-21 11:34 +0200
Re: primitive instruction for programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-21 11:48 +0100
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-21 13:10 +0200
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-21 10:53 +0100
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 20:09 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 12:48 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-14 09:40 +0200
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-14 11:24 +0100
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-14 05:39 -0500
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-14 13:29 +0200
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 10:59 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 03:28 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 03:33 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 03:59 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 04:23 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 11:36 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 04:26 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 12:41 +0100
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 06:26 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-13 15:33 +0200
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 06:44 -0700
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-13 16:30 +0200
Re: primitive instruction for programming Ian Collins <ian-news@hotmail.com> - 2015-04-14 07:52 +1200
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-14 09:47 +0200
Re: primitive instruction for programming raltbos@xs4all.nl (Richard Bos) - 2015-04-14 08:10 +0000
Re: primitive instruction for programming David Brown <david.brown@hesbynett.no> - 2015-04-14 10:40 +0200
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-13 17:52 +0000
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-13 18:20 -0500
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-13 18:33 -0500
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-14 19:51 +0000
Re: primitive instruction for programming Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-16 09:04 -0700
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-17 02:25 +0000
Re: primitive instruction for programming Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-17 08:34 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-17 17:49 +0100
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-17 19:06 +0000
Re: primitive instruction for programming Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-17 20:45 -0700
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-18 16:43 +0000
Re: primitive instruction for programming Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-18 09:56 -0700
Re: primitive instruction for programming Stephen Sprunk <stephen@sprunk.org> - 2015-04-17 17:52 -0500
Re: primitive instruction for programming Morris Dovey <mrdovey@iedu.com> - 2015-04-17 18:02 -0500
Re: primitive instruction for programming Stephen Sprunk <stephen@sprunk.org> - 2015-04-17 19:26 -0500
Re: primitive instruction for programming Morris Dovey <mrdovey@iedu.com> - 2015-04-17 20:04 -0500
Re: primitive instruction for programming Michael Angelo Ravera <maravera@prodigy.net> - 2015-04-19 14:59 -0700
Re: primitive instruction for programming Richard Heathfield <rjh@cpax.org.uk> - 2015-04-20 00:19 +0100
Re: primitive instruction for programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-20 02:06 +0100
Re: primitive instruction for programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-20 02:26 +0100
Re: primitive instruction for programming Richard Heathfield <rjh@cpax.org.uk> - 2015-04-20 02:18 +0100
Re: primitive instruction for programming Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-18 18:59 -0700
Re: primitive instruction for programming Steve Thompson <stevet810@gmail.com> - 2015-04-19 16:28 +0000
Re: primitive instruction for programming Richard Damon <Richard@Damon-Family.org> - 2015-04-19 17:16 -0400
Re: primitive instruction for programming Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-22 15:28 -0700
Re: primitive instruction for programming John Bode <jfbode1029@gmail.com> - 2015-04-23 07:20 -0700
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 03:07 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 09:47 -0700
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 11:09 -0700
Re: primitive instruction for programming Noob <root@127.0.0.1> - 2015-04-13 20:43 +0200
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 12:09 -0700
Re: primitive instruction for programming Xcott Craver <xcottcraver@gmail.com> - 2015-04-14 07:11 -0700
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-14 07:28 -0700
Re: primitive instruction for programming Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-04-14 15:57 +0100
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-14 08:13 -0700
Re: primitive instruction for programming fir <profesor.fir@gmail.com> - 2015-04-13 14:02 -0700
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 14:28 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 22:51 +0100
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 14:58 -0700
Re: primitive instruction for programming Bartc <bc@freeuk.com> - 2015-04-13 23:25 +0100
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 15:37 -0700
Re: primitive instruction for programming James Kuyper <jameskuyper@verizon.net> - 2015-04-13 19:09 -0400
Re: primitive instruction for programming fmassei@gmail.com - 2015-04-13 16:20 -0700
Re: primitive instruction for programming Robert Wessel <robertwessel2@yahoo.com> - 2015-04-13 18:03 -0500
Re: primitive instruction for programming asetofsymbols@gmail.com - 2015-04-13 20:58 -0700
Re: primitive instruction for programming fir <profesor.fir@gmail.com> - 2015-04-13 15:02 -0700
csiph-web