~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/3rdparty/squirrel/samples/loops.nut

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Matthijs Kooijman, Jordi Mallach
  • Date: 2009-04-15 18:22:10 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090415182210-22ktb8kdbp2tf3bm
[ Matthijs Kooijman ]
* New upstream release.
* Remove Debian specific desktop file, upstream provides one now. 
* Add debian/watch file.

[ Jordi Mallach ]
* Bump Standards-Version to 3.8.1, with no changes required.
* Move to debhelper compat 7. Bump Build-Depends accordingly.
* Use dh_prep.
* Add "set -e" to config script.
* Remove a few extra doc files that get installed by upstream Makefile.
* Add more complete copyright information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
local arr=["one","two","three"]
 
2
 
 
3
::print("FOREACH\n");
 
4
 
 
5
foreach(i,val in arr)
 
6
{
 
7
        ::print("index ["+i+"]="+val+"\n");
 
8
}
 
9
 
 
10
::print("FOR\n");
 
11
 
 
12
for(local i=0;i<arr.len();i+=1)
 
13
{
 
14
        ::print("index ["+i+"]="+arr[i]+"\n");
 
15
}
 
16
 
 
17
::print("WHILE\n");
 
18
 
 
19
local i=0;
 
20
while(i<arr.len())
 
21
{
 
22
        ::print("index ["+i+"]="+arr[i]+"\n");
 
23
        i+=1;
 
24
}
 
25
::print("DO WHILE\n");
 
26
 
 
27
local i=0;
 
28
do
 
29
{
 
30
        ::print("index ["+i+"]="+arr[i]+"\n");
 
31
        i+=1;
 
32
}while(i<arr.len());