simple program in tcl

Posted by anuraj on 2016-04-18 04:44

how can I call a sub-tcl program in main tcl program? Can you give me an example? "exec" is not worked for me.My program is
exec bult.tcl
can you please help me?

% tclsh exec.tcl
couldn't execute "bult.tcl": no such file or directory
while executing
"exec bult.tcl"
(file "exec.tcl" line 1)
child process exited abnormally
% dir
Volume in drive D is New Volume
Volume Serial Number is A6B4-C164

Directory of D:\anuraj\test\4.fourth\intenship\tcl\program

18-04-2016 03:09 PM .
18-04-2016 03:09 PM ..
12-04-2016 04:41 PM 549 array.tcl
13-04-2016 05:16 PM 359 bult.tcl
12-04-2016 09:06 PM 626 dictionary.tcl
13-04-2016 12:48 PM 559 error.tcl
18-04-2016 06:13 PM 13 exec.tcl
12-04-2016 05:02 PM 682 file.tcl
18-04-2016 11:31 AM 60 flash.tcl
18-04-2016 02:45 PM 1,042 flush.tcl
18-04-2016 05:26 PM 410 fun.tcl
17-04-2016 01:03 PM 58 input.txt
12-04-2016 04:50 PM 57 input1.txt
13-04-2016 02:40 PM 596 namespace.tcl
18-04-2016 11:01 AM 9 primes_below_10
13-04-2016 10:05 AM 513 procedure.tcl
11-04-2016 03:36 PM 295 prog.tcl
12-04-2016 05:10 PM 2,900 program.txt
18-04-2016 11:25 AM 1,030 sample.tcl
17-04-2016 01:03 PM 56 select.txt
12-04-2016 04:42 PM 1,203 string.tcl
12-04-2016 05:07 PM 262 test.tcl
09-04-2016 10:54 AM 32 test.txt
17-04-2016 11:22 AM 2,949 updatedprogram.txt
22 File(s) 14,260 bytes
2 Dir(s) 362,973,032,448 bytes free