is that possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello all,

is the construction bellow valid in ansi C?

test("a",1)("b",2)("c",3);

Using some pointer-to-function magic i managed to get the form bellow,
but not the above one:

typedef void (test_fn)(char*, int);

test_fn *test(char *str,int len){
  /*...*/
}

test("a",1)("b",2);

Thanks in advance.

ps: i just want to know if such idiom could be valid, i'm aware of
fluent interfaces[1], i'm just want to know what i am missing of if
its indeed impossible.


[1]http://en.wikipedia.org/wiki/Fluent_interface


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux