Page 1 of 1

Passing Arguments to function handler of FInitializeHandler

Posted: Mon Nov 28, 2005 5:10 pm
by steve
I was wondering if it is possible to pass arguments to the underlying function FinitilizeHandler is calling:

ie. something like:

for jj=0,10 {
nc[jj] fih[jj] = new FInitializeHandler("loadqueue(jj)")
}

Here I want to pass the jj integer to loadqueue...

Thanks!

Posted: Wed Nov 30, 2005 8:51 am
by hines
The string has to be completly specified with
the actual value of jj. Use the idiom

Code: Select all

strdef tstr
for jj=0,10 {
    sprint(tstr, "loadqueue(%d)", jj)
    nc[jj] fih[jj] = new FInitializeHandler(tstr)
}