Re: [tcljava-user] Jacl documentation
Brought to you by:
mdejong
From: rahul <Rah...@Su...> - 2006-11-23 18:58:36
|
Hi Wei [Wei Dai:] | I wanted to understand the Jacl threading module and how can I get | STDOUT and STDERR using Jacl APIs. Please do explain what you intend to do with STDERR and STDOUT, they are used by the tcl commands to print the results, and I am not sure how you are planning to manipuate them. How ever, if you are planning to capture the results of an expression evaluation, then Interp.getResult should give you the result. If you are checking for any exceptions, just catching the TclException and checking the Interp.getResult should give you the exception raised. (check the Shell.java for example on using it.) | I also wanted to know if Interp.GetResults can be the used as STDOUT or | STDERR. I have noticed most time that it seems to be the STDOUT or | STDERR, but it does not give me STDOUT when it comes to commands like | puts. If you are familiar with java, puts behaves similar to System.out.println (by default with out a channel) while the Interp.getResult gives you the value of an expression evaluated. (like that of a function call in java.) rahul |