Re: call_func and routine_id and...

new topic     » goto parent     » topic index » view thread      » older message » newer message

>I've got an include file I'm wanting to put some dynamically defined
>functions in... know what I mean?
>add_func_name("x") --adds the function named "x" to a list of functions.
>function x
>        --do something
>return something
>end function
>i = routine_id("x") -- right?
>All_Functions = append(All_Functions, i)
>Then later, to call it:
>call_func(All_Functions[someVariable])

take a look at EUServer, specifically the parser I built within it.
The brunt of the parser is contained in the files:
basiccmd.e and cmdlist.e within the euserver zip file...
it implements a dynamic function list like you describe.
another good example I know of is within win32lib itself for
storing the on_this[blah] and on_that[blech] stuff...
like on_load[window]=routineid(window_load)
and on_mouse[window]=routineid(window_mouse)
type of stuff...

so, those are two (imo, good) locations to get some pratical,
real world, easy to understand examples of the elegance of
routineID...

enjoy--Hawke'

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu