a = call fact( hex( 20 ) )
x = hex2int( $a )
if $x != 02432902008176640000
?
pause
endif
end
fact:
local in
local tmp
local resultx
local result
in = getpara
in = leftpack( $in, 4 )
if $in == 00000001
result = 01
else
tmp = sub( $in, 01 )
resultx = call fact( $tmp )
result = big_mul( $in, $resultx )
endif
return $result