diff options
author | rubidium <rubidium@openttd.org> | 2014-09-19 20:06:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-19 20:06:51 +0000 |
commit | 79ca66eb673c710432d1f4e51af70730a09a82c8 (patch) | |
tree | 5c26b5456711549c69e6d7c74b6e966072670cb6 /src/3rdparty/squirrel/samples/ackermann.nut | |
parent | bd0cd31d4b4e13dcf99c3b4170069d9eb08a91cf (diff) | |
download | openttd-79ca66eb673c710432d1f4e51af70730a09a82c8.tar.xz |
(svn r26853) -Cleanup [Squirrel]: remove some stuff that we never did and especially never should use
Diffstat (limited to 'src/3rdparty/squirrel/samples/ackermann.nut')
-rw-r--r-- | src/3rdparty/squirrel/samples/ackermann.nut | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/3rdparty/squirrel/samples/ackermann.nut b/src/3rdparty/squirrel/samples/ackermann.nut deleted file mode 100644 index 9fdaff06b..000000000 --- a/src/3rdparty/squirrel/samples/ackermann.nut +++ /dev/null @@ -1,23 +0,0 @@ -/* -* -* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/) -* -*/ - -function Ack(M, N) { - if (M == 0) return( N + 1 ); - if (N == 0) return( Ack(M - 1, 1) ); - return( Ack(M - 1, Ack(M, (N - 1))) ); -} - -local n; - -if(ARGS.len()!=0) { - n = ARGS[0].tointeger(); - if(n < 1) n = 1; -} else { - n = 1; -} -print("n="+n+"\n"); -print("Ack(3,"+ n+ "):"+ Ack(3, n)); - |