Re: tcl command "type"



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.
.



Relevant Pages

  • Re: tcl command "type"
    ... i have utilized the puts proposition but i just wondered if there ... was a dumping possibility. ... you can put a command in the file being ... which should be executed as it is read by the interpreter. ...
    (comp.lang.tcl)
  • Re: Completed my programming language overview with a BASIC for CP/M page also
    ... opinion on bywater basic - their should be a cp/m version ... The Bywater BASIC Interpreter implements a large ... It also offers shell programming facilities ... a shell command can be entered interactively at the ...
    (comp.os.cpm)
  • Re: file associations
    ... Perhaps add what Chris suggested and keep our names ... Linux Gazette) reads... ... an MP3 just by typing the MP3's filename at the command prompt. ... interpreter, the system will start up the program for you. ...
    (alt.os.linux)
  • Re: Switching from tcsh to bash as an interactive shell
    ... > Every shell is, by definition, an interpreter. ... A PRGRAMMING LANGUAGE - some of them are command launchers and nothing ... as it may be as an interpreter of its own programming language. ...
    (comp.os.linux.misc)
  • Re: Switching from tcsh to bash as an interactive shell
    ... > Every shell is, by definition, an interpreter. ... A PRGRAMMING LANGUAGE - some of them are command launchers and nothing ... as it may be as an interpreter of its own programming language. ...
    (comp.unix.shell)