Kevin,
Just an FYI, the approach of using eval() discussed here was how I attempted to implement a dispatch table, but unfortunately it does not seem to be working in my case due to what appears to be a bug causing the DVP to crash when used recursively (something I need to do for my use case). The following code reproduces the issue:
Sub Main()
result = SomeFunction(100)
End Sub
Function SomeFunction(x as integer) as integer
if x = 0 then
return 0
else
x = x -1
result = -1
eval("result = SomeFunction(x)")
return result
end if
End Function
In the case of the dispatch table I implemented this would cause crashes non-deterministically so I'm not entirely sure where the issue is. I can only guess it has to do with using eval() from within the context of another eval() call. For the time being I've switched to using an ugly if/else if/else if/..../else statement.
-Mark