File open



Greetings,

I used tcl about 10 years ago and yesterday thought of an ideal
application for it in my current job. I have a long list of comma and
line separated words in a c header file that I need to expand. The
source file is of the form:

parm1,
parm2,
parm3,

The output file should be a c array intiailization series:
{parm1, parm1_src, parm1_dst, "parm1"},
{parm2, parm2_src, parm2_dst, "parm2"},


All my previous tcl work was on Unix or linux systems but last night I
tried it on a PC and could not even get the source file open. The
source file is in the same directory as the script I am sourcing: c:/
Top/tcl/bin/work but I could not open it sourcing this script.

set path [file join c: Top tcl bin work a.txt]
set fid [open $path r]


From the wish window a dir cmd shows the file exists and I could open
it from the cmd line. I know there is something funny about Windows
file names but thought file join would take care of it.

So if you could tell me what silly/stupid/ignorant mistake I am making
I would appreciate it.


Thanx,
gtb
.



Relevant Pages

  • Re: clock format does not run in window service
    ... I tried a new installation of tcl 8.5.0 an the TclDevKit 4.1.0 on a system where tcl never have been installed before. ... application-specific initialization failed: wrong # args: should be "source file ... That your source command only accepts one parameter instead of having ...
    (comp.lang.tcl)
  • Re: File open
    ... All my previous tcl work was on Unix or linux systems but last night I ... I know there is something funny about Windows ... file names but thought file join would take care of it. ... % set path ...
    (comp.lang.tcl)
  • Re: SOS
    ... > I want use swig to generate c code interface for tcl, ... (you have to select that you want mingw32 installed with the cygwin ... my c++ source file was fox.cpp so use whatever your source file extension ... my instructions came from. ...
    (comp.lang.tcl)
  • Re: Best practices, [source]
    ... in the same version (Tcl 7.5) as the first port to Windows. ... A 'master' source file ... Sourcing at the beginning of the file ... Sourcing in each proc, only the files that are needed for that proc ...
    (comp.lang.tcl)
  • Re: concatenate files
    ... Tcl is more a programming language than a unix -shell and has ... fcopy $fd $targetfd ...
    (comp.lang.tcl)