Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: Handy tool for C coders  (Read 1372 times)

0 Members and 1 Guest are viewing this topic.

Offline Karlos

Handy tool for C coders
« 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 :)
int p; // A
 

Offline SamuraiCrow

Re: Handy tool for C coders
« Reply #1 on: August 29, 2011, 04:14:37 PM »
I remember seeing this on a Fred Fish disk many years ago.  It's cool that they made a web site version though.
 

Offline ChaosLord

Re: Handy tool for C coders
« Reply #2 on: August 29, 2011, 04:17:28 PM »
What does (^) mean?
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline SamuraiCrow

Re: Handy tool for C coders
« Reply #3 on: August 29, 2011, 04:21:01 PM »
It's an exclusive or operator but the program on the website only covers variable declarations.
 

Offline ChaosLord

Re: Handy tool for C coders
« Reply #4 on: August 29, 2011, 04:53:40 PM »
The 3rd example disgorges the following rumination:
Code: [Select]
(double (^)(int , long long ))foo

I don't understand.
« Last Edit: August 29, 2011, 05:28:00 PM by ChaosLord »
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline SamuraiCrow

Re: Handy tool for C coders
« Reply #5 on: August 29, 2011, 05:15:11 PM »
--never mind-- Karlos had the answer.
« Last Edit: August 29, 2011, 05:17:10 PM by SamuraiCrow »
 

Offline Karlos

Re: Handy tool for C coders
« Reply #6 on: August 29, 2011, 05:15:12 PM »
Quote from: ChaosLord;656706
The 3rd example disgorges the following rumination:
Code: [Select]
(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)
int p; // A
 

Offline Karlos

Re: Handy tool for C coders
« Reply #7 on: August 29, 2011, 05:27:27 PM »
Quote from: SamuraiCrow;656709
--never mind-- Karlos had the answer.


Still, it doesn't happen often :lol:
int p; // A
 

Offline ChaosLord

Re: Handy tool for C coders
« Reply #8 on: August 29, 2011, 05:35:05 PM »
Blocks, Thunks and Closures...  ow.  My brain hurts.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA