Re: tcl command "type"
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: tcl command "type"

From: Donald Arseneau <asnd@triumf.ca>
Date: Sun Jan 01 2006 - 04:44:36 CET

suchodj@wanadoo.fr writes:

> i am under windows xp family and Tcl/Tk 8.4
>
> in the book "SAMS teach yourself Tcl/Tk" isbn 0-672-31749-4
> page 154 listing 9.6 i find the following code
>
> source myfile.tcl
> type myfile.tcl
>
> when i code it i obtain the following error
>
> invalid command name "type"

While "type" is not a Tcl command, it is a windows console (dos)
command, so it should work if you type it to the console. But you
say you "code it" which is ambiguous, and probably is the source
of trouble.

Both tclsh and the wish console try to execute unknown commands
as system commands -- that is the "sh" or "shell" function, but
they are still very poor command shells for general use!

> my question is: if after having source any myfile.tcl i want to
> print it in the console is there a command to do it ?

By the way, the "type" command shows the file contents, just like in
Dos, regardless if you "source" the file before, after, or not at all.

-- 
Donald Arseneau                          asnd@triumf.ca
Received on Tue Jan 3 03:10:01 2006