代码搜索:recursive
找到约 2,177 项符合「recursive」的源代码
代码结果 2,177
www.eeworm.com/read/212063/15166324
cpp fib.cpp
int fibonacci(int n)
/* fibonacci: recursive version
Pre: The parameter n is a nonnegative integer.
Post: The function returns the nth Fibonacci number.
*/
{
if (n
www.eeworm.com/read/208614/15242550
f90 ex0828.f90
program ex0828
implicit none
integer :: n
integer, external :: fact
write(*,*) 'N='
read(*,*) n
write(*, "(I2,'! = ',I8)" ) n, fact(n)
stop
end
recursive integer function fac
www.eeworm.com/read/162614/5523742
ada c58004c.ada
-- C58004C.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025,
www.eeworm.com/read/159030/5588837
java rhs.java
// $Id: Rhs.java,v 1.4 2000/10/05 21:41:06 mdeeds Exp $
package java6035.tools.IR;
/**
* An object that implements the Rhs interface is allowed to appear on the
* right hand side of an instruction
www.eeworm.com/read/249464/12501568
m gridsamp.m
function S = gridsamp(range, q)
%GRIDSAMP n-dimensional grid over given range
%
% Call: S = gridsamp(range, q)
%
% range : 2*n matrix with lower and upper limits
% q : n-vector, q(j) is the
www.eeworm.com/read/106262/15642257
c grtsd.c
void topsort(Graph& G) { // Topological sort: recursive
for (int i=0; i
www.eeworm.com/read/104361/15697149
tig test39.tig
/* This is illegal, since there are two functions with the same name
in the same (consecutive) batch of mutually recursive functions.
See also test48 */
let
function g(a:int):int = a
fun
www.eeworm.com/read/104361/15697153
tig test48.tig
/* This is legal. The second function "g" simply hides the first one.
Because of the intervening variable declaration, the two "g" functions
are not in the same batch of mutually recursive f
www.eeworm.com/read/104361/15697160
tig test4.tig
/* define a recursive function */
let
/* calculate n! */
function nfactor(n: int): int =
if n = 0
then 1
else n * nfactor(n-1)
in
nfactor(10)
end
www.eeworm.com/read/104361/15697172
tig test47.tig
/* This is legal. The second type "a" simply hides the first one.
Because of the intervening variable declaration, the two "a" types
are not in the same batch of mutually recursive types.