1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

embeded tcl

Discussion in 'Support' started by fpefpe, Apr 25, 2011.

  1. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    251
    Likes Received:
    1
    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
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,859
    Likes Received:
    83
    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".
     
  3. fpefpe

    Joined:
    Oct 18, 2008
    Messages:
    251
    Likes Received:
    1
    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
     

Share This Page