Tcl

Tcl

Installation

Ubuntu
apt install tcl
AlmaLinux
dnf install tcl
Arch Linux
pacman -S tcl

Examples

Fibonacci Numbers
# Fibonacci Numbers
proc tcl::mathfunc::fib {n} {
    if {$n < 2} {
        return $n
    } else {
        return [expr fib([expr $n - 1]) + fib([expr $n - 2])]
    }
}

set n [lindex $argv 0]
puts [expr fib($n)]

if 0 {
    example
        run:
            tclsh fibonacci.tcl 10
}