mariadb/dbug/factorial.c
monty@hundin.mysql.fi 7cadc6e711 Changed to use my_global.h
Fixed problem with LIKE with latin1_de
Added parsing support of UNSIGNED LONG LONG
2001-09-14 02:54:33 +03:00

17 lines
355 B
C

#ifdef DBUG_OFF /* We are testing dbug */
#undef DBUG_OFF
#endif
#include <my_global.h>
int factorial (
register int value)
{
DBUG_ENTER ("factorial");
DBUG_PRINT ("find", ("find %d factorial", value));
if (value > 1) {
value *= factorial (value - 1);
}
DBUG_PRINT ("result", ("result is %d", value));
DBUG_RETURN (value);
}