Re: Variables to call... (fwd)
Posted in 1994
From Dennis Pimple: * * benjamin@rs6a.wln.com (Ben Gardner-Young) writes: * * >Hi folks, * >I am running 4gl 4.10.UC1 on a Sun and have the following question: * >Is there not a method to pass variables to the 4gl 'call' routine or * >construct a string that can be run that contains 'call'? * >I am trying to store report names in a table and let the users select * >them from an array. When chosen, the name of the report would be 'called'. * >I know that 'run' is used only for command line stuff, but this example is * >used only to show what I am trying to do. * * >e.g. * * >define * > run_str char(128), * > foo char(16) * * >let foo = "my_func()" * >let run_str = "call ", foo clipped * >run run_str * * * >It would seem short-sighted to have designed the tools without this * >feature if this is the case. * * This type of functionality currently isn't available, and I think it * would be very difficult to implement, since function names need to be * known at compile/link time. You could, of course, make the functions * seperate executables, then RUN them, passing in appropriate * parameters. The RUN has the advantage of being background batched, so * you don't have to wait for one report to complete before firing off * another one. Why not CASE it? For example: CASE WHEN foo = "my_func" CALL my_func() WHEN foo = "your_func" CALL your_func() WHEN foo = "our_func" CALL our_func() WHEN foo = "noones_func" CALL noones_func() OTHERWISE END CASE Just a suggestion. Robert Minter |Data Systems Support| \\\\\\_/// Programmer, Software Development | Orange, CA | ( _ _ ) internet: rob@dssmktg.com | Tel: 714.771.0454 | (| ^ |) bangpath: uunet.uu.net!dssmktg!rob| Fax: 714.771.3028 | \\`-'/ Computer programmers do it byte by byte !! \\_/