Re: Dynamic proc call

#57028
Tom Henderson
Participant

Something like that.  First, put your arguments into a list variable, then use the eval command to call your proc with that list.  The eval command “flattens” your list so they look like individual variables.

Something like:

set listArgs

    eval ECP_Send_Email $listArgs

    The eval command will let you construct just about any command dynamically, then call it.  It works with lists, though, not strings.  Create the command as a list, then use eval.

    But if you’re doing a proc call, you want to be sure that the list you’re passing to the proc has the same number of arguments as the proc is expecting, or you will get a run-time error.

Forum Statistics

Registered Users
5,116
Forums
28
Topics
9,292
Replies
34,432
Topic Tags
286
Empty Topic Tags
10