[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Static variables (grischka5)
From: |
Rob Landley |
Subject: |
Re: [Tinycc-devel] Static variables (grischka5) |
Date: |
Wed, 2 May 2007 20:32:13 -0400 |
User-agent: |
KMail/1.9.1 |
On Wednesday 02 May 2007 6:48 pm, David A. Wheeler wrote:
> > Return value is a pointer to a function "void blah(void)"; Check, I
> > think.
>
> To be fair, this isn't one of C's better areas. Some other languages'
> notations make this kind of declaration easier; every language has its +s
> and -s.
Back around 1990 I wrote a program that needed an array of function pointers.
(Yeah, I reinvented bytecode. In my defense, I'd never heard of it before.)
I worked out the syntax for this with nothing more than a passing mention of
function pointers (and one example) in the Herbert Schildt book "How to
program in Turbo C". (Luckily, there were a finite number of places to
attempt to insert the square brackets.)
I am quite aware that function pointers are a bit of an afterthought in C,
syntax-wise. But this was a particularly egregious example, and it STILL
looks like there's more parentheses there than are strictly necessary...
Rob