Re: tcl command "type"
- From: Alan Anderson <aranders@xxxxxxxxxxxxx>
- Date: Sat, 31 Dec 2005 19:52:23 GMT
suchodj@xxxxxxxxxx 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.
.
- References:
- tcl command "type"
- From: suchodj
- Re: tcl command "type"
- From: Bryan Oakley
- Re: tcl command "type"
- From: suchodj
- tcl command "type"
- Prev by Date: Re: tcl command "type"
- Next by Date: Re: tcl command "type"
- Previous by thread: Re: tcl command "type"
- Next by thread: Re: tcl command "type"
- Index(es):
Relevant Pages
|