Page 1 of 1

Pointer to functions (feature request)

Posted: Tue May 08, 2007 1:36 pm
by MLS_ADMIN
If it doesn't already exist it would be nice to be able to do something like this:

<call $functionname var1 var2 ...>

rather than:

<switch $functionname>
<case "dothis><dothis var1 var2>
<case "dothat><dothat var1 var2>
...
</switch>

Am I correct that this feature doesn't currently exist?

Thanks,

Aaron

Pointer to functions (feature request)

Posted: Tue May 08, 2007 3:59 pm
by mark
Correct except in the context of the cmd variable on entry to main. See http://www.thunderstone.com/site/vortexman/cmd.html

Pointer to functions (feature request)

Posted: Tue May 08, 2007 5:22 pm
by John
If you have validated the $functionname argument somehow you could use the SANDCALL feature, e.g.

<fmtcp sandcall $functionname $functionname>
<sb>$functionname</sb>

to call the function, although with no arguments.

Pointer to functions (feature request)

Posted: Tue May 08, 2007 10:29 pm
by MLS_ADMIN
That might work.

Thanks.