It will be great if somebody could convert this TCL code into JACL.
************************************************************************************************************************
#!/usr/bin/tclsh
#
# matrix1.tcl
#
# example matrix including a self-edge and a bidirected edge
set matrix {
0 1 1 0
0 0 1 1
0 0 0 1
0 0 1 1
}
set size 4
puts "digraph G \{"
for {set i 0} {$i < $size} {incr i} {
for {set j 0} {$j < $size} {incr j} {
if {[lindex $matrix [expr $i * $size + $j]]} {
puts "n$i -> n$j"
}
}
}
puts "\}"
---------------------------------------------------------------------------------
Process with:
./matrix1.tcl | dot -Tpng | display -
************************************************************************************************************************
Bye,
Viki.
Would it be even better if I told you that it was already valid Jacl code?
-- Neil