Files @ r16273:16ddd6e87b1f
Branch filter:

Location: cpp/openttd-patchpack/source/src/3rdparty/squirrel/samples/loops.nut - annotation

rubidium
(svn r20989) -Change: make extra_grf's pcx files DOS palettes instead of converting them during compilation. Also fix misconverted sprite and some comments
local arr=["one","two","three"]

::print("FOREACH\n");

foreach(i,val in arr)
{
	::print("index ["+i+"]="+val+"\n");
}

::print("FOR\n");

for(local i=0;i<arr.len();i+=1)
{
	::print("index ["+i+"]="+arr[i]+"\n");
}

::print("WHILE\n");

local i=0;
while(i<arr.len())
{
	::print("index ["+i+"]="+arr[i]+"\n");
	i+=1;
}
::print("DO WHILE\n");

local i=0;
do
{
	::print("index ["+i+"]="+arr[i]+"\n");
	i+=1;
}while(i<arr.len());