home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource.old
/
1_14.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
175b
|
15 lines
#
# Example 1-14
# A recursive definition of factorial.
#
proc Factorial {x} {
if {$x <= 1} {
return 1
} else {
return [expr {$x * [Factorial [expr {$x - 1}]]}]
}
}