Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

can somebody plz. convert this TCL code into JACL?

3 views
Skip to first unread message

viki.s...@gmail.com

unread,
Apr 27, 2006, 8:20:35 AM4/27/06
to
Hi,

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.

Neil Madden

unread,
Apr 27, 2006, 6:12:05 PM4/27/06
to
viki.s...@gmail.com wrote:
> Hi,
>
> It will be great if somebody could convert this TCL code into JACL.

Would it be even better if I told you that it was already valid Jacl code?

-- Neil

0 new messages