source unixconsole.tcl source bwiseprocs0343.tcl bwise update wm geom . 636x350+9+4 # comment out when no more need.. welcome package require Img procs_window update wm geom .f 355x351+658+4 #.f.fu.l conf -font {{MS Sans Serif} 10} #.f.ft.t conf -font {{MS Sans Serif} 12} console eval {.console conf -font {courier 14}} console eval { wm geom . 80x24+193+335 }
To execute a Maxima command, I've made this procedure, primarily for linux/unix:
proc domaxima {m} { set t "display2d:false;\n$m;" return [string range [exec maxima << $t | tail -2 ] 4 end-6] }The pipe with tail can certainly be replaced by non-streaming tcl commands, but this appeared to work.The variable t contains the constructed maxima commands, including setting the format to displaying results in reusable form, while the exec is given this variables' content as stdin. At EOF maxima simply quits, and all stdout data is flushed and filtered.Basically calling this procedure will start a maxima process which evaluates the argument m and returns the single maxima result, which can also be done as part of a bwise block, of which the blockfunction could be:
newproc {set Maxima.out [domaxima ${Maxima.in}]} MaximaThis block can now be used in normal bwise graphs, and for instance the right-click popup 'Data' menu gives access to its variables, and allows direct editing of the pin variable contents, and allows the block to be fired without further graph with the Eval button.
In the same context, I've made a script to automatically use the maxima 'fortran' command to generate function values under C control: a tcl script for function value listing based on a fortran expression.Also, the xmaxima for linux (unix) can be given a console with the abovementioned script by editing/usr/bin/xmaxima with a text editor, and near the very end adding:
MAXTkmaxima tkmaxima rename exit tkexit proc exit {{val "0"}} {tkmaxima exit "" $val} ## ADD (changing path to match your console script file): source /home/theo/Tcl/unixconsole.tcl ## tkmaxima install