summaryrefslogtreecommitdiff
path: root/src/3rdparty/squirrel/samples/array.nut
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-09-19 20:06:51 +0000
committerrubidium <rubidium@openttd.org>2014-09-19 20:06:51 +0000
commit79ca66eb673c710432d1f4e51af70730a09a82c8 (patch)
tree5c26b5456711549c69e6d7c74b6e966072670cb6 /src/3rdparty/squirrel/samples/array.nut
parentbd0cd31d4b4e13dcf99c3b4170069d9eb08a91cf (diff)
downloadopenttd-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/array.nut')
-rw-r--r--src/3rdparty/squirrel/samples/array.nut28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/3rdparty/squirrel/samples/array.nut b/src/3rdparty/squirrel/samples/array.nut
deleted file mode 100644
index 58f160b12..000000000
--- a/src/3rdparty/squirrel/samples/array.nut
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-*
-* Original Javascript version by David Hedbor(http://www.bagley.org/~doug/shootout/)
-*
-*/
-local n, i, k;
-
-if(ARGS.len()!=0) {
- n = ARGS[0].tointeger();
- if(n < 1) n = 1;
-} else {
- n = 1;
-}
-
-local x = []; x.resize(n);
-local y = []; y.resize(n);
-
-for (i = 0; i < n; i+=1) {
- x[i] = i + 1;
- y[i] = 0;
-}
-
-for (k = 0 ; k < n; k+=1) {
- for (i = n-1; i >= 0; i-=1) {
- y[i] = y[i]+ x[i];
- }
-}
-print(y[0].tostring()+" "+y[n-1]);