In Pick BASIC source code I see lines such as
CALL SOMEPROGRAM (PARAM1, PARAM2)
How can I invoke that same line from the TCL command prompt? I've tried variations of the following but nothing seems to work.
SOMEPROGRAM ('1','2')
The only way I've found is to write and compile a program with the single line command and then run that program.
Tcl can invoke your overall program file as a subprocess using
exec
, but it is up to your program to turn that into a call to the program and processing of correct arguments.The Tcl code to run the program will probably look something like this:
If you were passing the arguments
1
and2
over, you'd do this:Again, that does not say how those values get from the command line into the Pick Basic subprogram. You'll need to consult the Pick documentation for how to do that. But I know (and have tested) that Tcl will definitely have correctly provided them…