Re: tcl command "type"
- From: suchodj@xxxxxxxxxx
- Date: Sun, 01 Jan 2006 17:04:57 +0100
Hello Donald
i agree about DOS and the effects of "type".
In his post Alan Anderson tells me :
"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."
Alan is right. I thaught that sourcing was loading in fact which of
course is not true at all. Anyway this is one more mistake i will not
make in the future (hopefully).
thank you very much for helping
and all my greetings for the new year 2006
friendly
jerome
On 31 Dec 2005 19:44:36 -0800, Donald Arseneau <asnd@xxxxxxxxx> wrote:
>suchodj@xxxxxxxxxx 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.
.
- References:
- Re: tcl command "type"
- From: Donald Arseneau
- Re: tcl command "type"
- Prev by Date: Re: TclX on Windows - anybody successfully trap SIGTERM / SIGKILL
- Next by Date: Re: InstallJammer 1.0a1 Released!
- Previous by thread: Re: tcl command "type"
- Next by thread: Re: Serial Ports across platforms
- Index(es):
Relevant Pages
|