svn commit: samba r7128 - in branches/SAMBA_4_0/testprogs/ejs: .
tridge at samba.org
tridge at samba.org
Tue May 31 01:52:14 GMT 2005
Author: tridge
Date: 2005-05-31 01:52:14 +0000 (Tue, 31 May 2005)
New Revision: 7128
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7128
Log:
added recursion to bugs list
Modified:
branches/SAMBA_4_0/testprogs/ejs/bugs.js
Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/bugs.js
===================================================================
--- branches/SAMBA_4_0/testprogs/ejs/bugs.js 2005-05-31 01:48:04 UTC (rev 7127)
+++ branches/SAMBA_4_0/testprogs/ejs/bugs.js 2005-05-31 01:52:14 UTC (rev 7128)
@@ -69,8 +69,27 @@
}
+/****************************************
+demo lack of recursion
+fix in http://build.samba.org/build.pl?function=diff;tree=samba4;revision=7127
+*****************************************/
+function fibonacci(n) {
+ if (n < 3) {
+ return 1;
+ }
+ return fibonacci(n-1) + fibonacci(n-2);
+}
+function recursebug() {
+ println("First 10 fibonacci numbers:");
+ for (i=0;i<10;i++) {
+ println("fibonacci(" + i + ")=" + fibonacci(i));
+ }
+}
+
+
/* run the tests */
arraybug();
argsbug("one", "two", "three");
+recursebug();
objbug()
More information about the samba-cvs
mailing list