Passing Arguments to function handler of FInitializeHandler

The basics of how to develop, test, and use models.
Post Reply
steve

Passing Arguments to function handler of FInitializeHandler

Post 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!
hines
Site Admin
Posts: 1692
Joined: Wed May 18, 2005 3:32 pm

Post 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)
} 
Post Reply