I am new to tcl
I wrote a code as ...
#!/usr/bin/tclsh
# get all co-ordinates of cell from arguments
# if suffiecient arguments are not there then print error and exit
# Calculate area of cell
lassign $argv a b c d e f g h
if {$argc != 8} {
puts "Error in argument count"
exit
} elseif {$b > $d} {
puts "Error: x1 is greater than x2 value"
exit
} elseif {$f > $h} {
puts "Error: y1 value is greater than y2"
exit
}
puts "Everything is correct proceed"
set area [expr ($d - $b) * ($h - $f)]
puts "Area of cell is $area"
when executing in mac terminal as...
source ./special_var.txt x1 20 x2 30 y1 30 y2 60
i am getting error as ...
wrong # args: should be "source ?-encoding name? fileName"