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: Alan Anderson <aranders@insightbb.com>
Date: Sat Dec 31 2005 - 20:52:23 CET

suchodj@wanadoo.fr wrote:

> thank you for helping.
> my idea was the following : i am coding a little application and
> sourcing several files in a sort of main file. In order to check if
> the files were correctly sourced i thaught of dumping them ???

If you want to make sure the files were [source]d properly, you can use
the [info proc] command to verify the existence of the expected
procedures. Alternately, you can put a [puts] command in the file being
[source]d, which should be executed as it is read by the interpreter.

> Anyway with your code I will be able to make my dumping.

Bryan's [type] just reads a file and returns its contents. It won't
tell you whether the [source] command was used.

> Sorry if my checking solution is "exageratly newbee-ish".

It looks like you might be thinking of the Tcl shell as if it were an
ancient BASIC interpreter. The [source] command doesn't "load" a file
to be run later. It actually interprets the file as it is read.
Received on Tue Jan 3 03:09:59 2006