where is output
Posted by ysrise (ysrise), 18 August 2004I wrote a very simple tcl program.
set foo "john"
puts "Hi my name is $foo"
I run it under Windows 2000 using the command window. But there was no outputs showed on the window. It just poped out a tk window and finished.
Does anyone know why?
Thanks a lot.
Posted by admin (Graham Ellis), 19 August 2004Sounds like you're running under wish (i.e. tcl/tk) if a Tk window popped up. The #! line isn't doing anything (and is misleading). Try running under Tcl rather that Tk ... if you have to run under Tk, try creating a label and packing it. Even under Tk, something odd is going on as in wish it should stick within the main application loop.
Dunno where your output is going .... if you're running under wish and/or your program is termining early (which ity might be, but I can't tell from what information I have) there's a chance that your output is correctky routed but it's buffered by Tcl and the buffer didn't get flushed to the output before the program terminated.
Next stage? Have a look at the thoughts above, modify what you're doing, experiement to find which of the suggestions may or may not be correct.
Posted by ysrise (ysrise), 19 August 2004Thank you for replying.
I added a line code
after my program, still there is no output.
But I don't know how to make my program run under tcl instead of tk.
Can a tcl program run under tcl and tk at a same time?
Posted by admin (Graham Ellis), 19 August 2004OK ... let's take a step back here. Do you need a GUI (Graphic User interface - buttons, text boxes, etc in their own window) or do you want to have something that's purely command line?
Other Forum Posts
where is output
Follow us on ...
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho