Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

embeded tcl

Oct
356
2
Hello –

I could not find any post for tcl in the forums – I would appreciate info on how the embedded support works for tcl –

My guess is that now tc/tk is loaded ( from a dll ) into tcc, but if I understands the doc, its (re)loaded for each tcl script that is processed – Is that correct?

Once tcl is loaded, how does tcc figure out what to run if I type at the comand line

foo

and there are files ( in the search path ) named

foo.cmd
foo.bat
foo.btm
foo.tcl

is there a search order if multiple embedded processors are loaded? Ie tcl and python?

I been using the rexx support for years now and the way that work makes sense – tcc peaks at the first 2 characters of the cmd file and if its “/*” the file is process by the loaded rexx interpreter – is there a similar schema for tcl, ie (using shebang )

# tcl

so the tcl code can be in a cmd file or something like this?

Thanks
 
I could not find any post for tcl in the forums – I would appreciate info on how the embedded support works for tcl –

See "Tcl/tk Support" in the help.

My guess is that now tc/tk is loaded ( from a dll ) into tcc, but if I understands the doc, its (re)loaded for each tcl script that is processed – Is that correct?

No, it's loaded once when TCC starts. TCC does create a new instance of the interpreter each time a Tcl script is executed. (Tk doesn't support persistent interpreters.)

Once tcl is loaded, how does tcc figure out what to run if I type at the comand line

See PATHEXT in the help.

I been using the rexx support for years now and the way that work makes sense – tcc peaks at the first 2 characters of the cmd file and if its “/*” the file is process by the loaded rexx interpreter – is there a similar schema for tcl, ie (using shebang )

TCC supports the shebang. I don't know if Tcl does, and in any event it would result in running the script using the external Tcl interpreter. So if you want to do that, you might just as well run "tcl scriptname".
 
See "Tcl/tk Support" in the help.



No, it's loaded once when TCC starts. TCC does create a new instance of the interpreter each time a Tcl script is executed. (Tk doesn't support persistent interpreters.)



See PATHEXT in the help.



TCC supports the shebang. I don't know if Tcl does, and in any event it would result in running the script using the external Tcl interpreter. So if you want to do that, you might just as well run "tcl scriptname".

Thanks for the info ..

I would want to use the "loaded" tcl -- so the tcc figures out the order buy the way pathext is set up --

Thanks

FP Esposito
 
Back
Top