Re: [tcljava-user] help - how to execute a tcl from java
Brought to you by:
mdejong
From: Horace A. 'K. V. <ha...@ha...> - 2007-10-01 19:37:33
|
to get the retultsd of the puts in the tcl, maybe something like ... interp.getResult().toString(); ...following the eval call? > java stub : > Interp interp = new Interp(); > > try { > interp.evalFile("test.tcl"); System.out.print(interp.getResult().toString()); > System.out.println("running tcl done."); > } > catch (TclException ex) { > // some exception handling > } > } > finally { > interp.dispose(); > } > > test.tcl contents : > set a 3 > set b 4 > set message "c = sqrt($a*$a+$b*$b) = [expr sqrt($a*$a+$b*$b)]" > puts $message > -- Horace ...once known as "Kicker" :-) ================================================================ ...drop by and chat if I'm online http://www.hav.com/chat/ ...or chuckle at a little left hand fingertip torture http://www.hav.com/junk/ After silence, that which comes nearest to expressing the inexpressible is music - Aldous Huxley, "Music at Night", 1931 ... and that which comes nearest to explaining the inexplicable is my insistence on trying to play it - hav '06 :-)) ================================================================ Horace Vallas hav.Software http://www.hav.com/ 4660 Francisco Rd. ha...@ha... Pensacola, Fl. 32504 USA 850-207-7009 Thawte Web Of Trust Notary in Pensacola, Fl. http://www.hav.com/?content=/thawteWOTnotary.htm |