Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The forced execution of souce code

Name: Anonymous 2009-11-19 5:27

How's called the ability of a language to interpret new code at runtime (the keyword/function that does this is typically called eval)?

For example Perl, Python, JavaScript and most shell languages have this. C and C++ haven't it.

Does Haskell have it? What about C#?

Note that shit like manually invoking the compiler doesn't count.

Name: Anonymous 2009-11-20 15:52

>>25
You can't convert a va_list back to real arguments, but I'm not sure why you want to create one in the first place.

#define apply(h, f, ...) (((int(*)())dlsym((h), (f)))(__VA_ARGS__))

int main(int argc, char **argv) {
    void *h = dlopen(NULL, RTLD_NOW);
    apply(h, "printf", "%d %d %d\n", 1, 2, 3);
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List