bug fix in xrange() that would cause it to yield bogus values
[vox.git] / examples / classattributes.vx
blob758f99ff0c9d9c9c1410f780b478339ee01c8f91
1 \r
2 class Foo\r
3 {\r
4     //constructor\r
5     constructor(a)\r
6     {\r
7         testy = ["stuff",1,2,3];\r
8     }\r
9     //attributes of PrintTesty\r
10     </ name = "PrintTesty"\r
11        description = "does some printy and testy"\r
12        copyright = "the poor fool who wrote it" />\r
13     function PrintTesty()\r
14     {\r
15         foreach(i,val in testy)\r
16         {\r
17             println("idx = ", i, " = ", val);\r
18         }\r
19     }\r
21     //attributes of testy\r
22     </ flippy = 10, second = [1,2,3] />\r
23     testy = null;\r
25 }\r
27 foreach(member,val in Foo)\r
28 {\r
29     println(member);\r
30     local attr\r
31     if((attr = Foo.getattributes(member)) != null)\r
32     {\r
33         foreach(i, v in attr)\r
34         {\r
35             println("\t%s = <%s> %s".fmt(i.tostring(), typeof v, v.repr()))\r
36         }\r
37     }\r
38     else\r
39     {\r
40         println("\t<no attributes>")\r
41     }\r