Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Karlos on August 29, 2011, 03:53:15 PM
-
After some time messing around with lesser languages, I found I forgot some of my C declaration syntax for some of the more exotic pointer types.
Anyway, I stumbled (actually, now that I think about it, I recall that maybe nicholas mentioned this one to me before) across the following site which is quite handy:
http://cdecl.org/
Enjoy :)
-
I remember seeing this on a Fred Fish disk many years ago. It's cool that they made a web site version though.
-
What does (^) mean?
-
It's an exclusive or operator but the program on the website only covers variable declarations.
-
The 3rd example disgorges the following rumination:
(double (^)(int , long long ))foo
I don't understand.
-
--never mind-- Karlos had the answer.
-
The 3rd example disgorges the following rumination:
(double (^)(int , long long ))foo
I don't understand.
Don't feel bad about that, it's not remotely standard C syntax, rather an Apple extension to C, called "blocks" which aim to mirror the functionality of lambda expressions in more recent languages.
More here: http://en.wikipedia.org/wiki/Blocks_(C_language_extension)
-
--never mind-- Karlos had the answer.
Still, it doesn't happen often :lol:
-
Blocks, Thunks and Closures... ow. My brain hurts.