%REM
功能:呼叫自己,可應用在數值累加的計算
參數:theNum%
限制:32K的限制
%ENDREM
Function Facto# (theNum%)
' Calculate theNum% factorial and make it
' the return value of Facto#.
If theNum% <= 0 Then
Facto# = 0
ElseIf theNum% = 1 Then
Facto# = 1
Else
Facto# = theNum% * Facto#(theNum% -1)
End If
End Function
----取自Lotus Domino Designer help
沒有留言:
張貼留言