on Sep 23rd, 2016, 8:40pm, Alincon wrote:I am trying to run an LB program in LBB. The LB program calls a subprogram with a RUN statement. |
|
There's no direct equivalent in LBB, but you have a number of options. One is to compile the subprogram to an EXE and then to run that using the RUN command with the LBB-specific WAIT option:
Code: RUN "subprogram.exe", WAIT
Another is to create a tokenized (.LBB) version of the subprogram ('Run... Make *.LBB file' menu option) and to run that using the optional run-time engine:
Code: RUN "LBBRUN subprogram.lbb", WAIT
The main shortcoming of those methods is that you cannot combine multiple options so by requiring the WAIT qualifier (which presumably you need to force LBB to wait until the subprogram has completed) you can't also specify HIDE or any of the other window states.
You could also consider rejigging your subprogram as a conventional SUB which you incorporate in your program using the 'include directive. Then you would run it with CALL in the usual way:
Code:
A possible disadvantage is that the subprogram will then share GLOBALs (including handles, arrays and structs) with the main program, which may not be what you want.
Hopefully one or other of those alternatives will meet your needs.
Richard.