Re: tcl command "type"



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.

.



Relevant Pages

  • Re: Ive never seen that message but Im guessing thatyou may be dealing with the
    ... If I can do a job with a single-line command ... By the way, DOS? ... I never said that attrib.exe as a console command was better - ... If I boot to Win98 and open a "console" window it's ...
    (microsoft.public.scripting.vbscript)
  • Re: Batch file (CMD) output into HTA
    ... be a group for console operations, ... types who like to use command line operations. ... are also using VBS and just don't know where else ... I open a console window on Win9x it's DOS. ...
    (microsoft.public.scripting.vbscript)
  • Re: Launching Another Executable from my Program (Borland C++)
    ... Is there a quick and dirty way to launch a console application (with ... command line args) from a DOS C++ app? ... LWhiz is an image viewing application that will open the jpg ... DOS it shouldn't matter too much. ...
    (comp.os.msdos.programmer)
  • Re: Change File Attributes
    ... In DOS, yes. ... detail the DOS method, and point out why you think ... I never said that attrib.exe as a console command was better - ...
    (microsoft.public.scripting.vbscript)
  • Re: Why is network reading slow?
    ... I am using the DOS command prompt's copy command. ... why such an incredibly tiny buffer? ... DWORD nTotal = 0; ...
    (microsoft.public.vc.mfc)