Files @ r16455:73fedf3e108b
Branch filter:

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

translators
(svn r21185) -Update from WebTranslator v3.0:
traditional_chinese - 5 changes by josesun
finnish - 17 changes by USephiroth
german - 4 changes by planetmaker
luxembourgish - 5 changes by Phreeze
polish - 5 changes by xaxa
brazilian_portuguese - 2 changes by bmnds
russian - 5 changes by Lone_Wolf
slovak - 4 changes by marek995
spanish - 4 changes by Terkhen
vietnamese - 4 changes by nglekhoi
class Foo {
	//constructor
	constructor(a)
	{
		testy = ["stuff",1,2,3];
	}
	//attributes of PrintTesty
	</ test = "freakin attribute"/>
	function PrintTesty()
	{
		foreach(i,val in testy)
		{
			::print("idx = "+i+" = "+val+" \n");
		}
	}
	//attributes of testy
	</ flippy = 10 , second = [1,2,3] />
	testy = null;

}

foreach(member,val in Foo)
{
	::print(member+"\n");
	local attr;
	if((attr = Foo.getattributes(member)) != null) {
		foreach(i,v in attr)
		{
			::print("\t"+i+" = "+(typeof v)+"\n");
		}
	}
	else {
		::print("\t<no attributes>\n")
	}
}