Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
22
Task/Collections/Visual-FoxPro/collections.visual
Normal file
22
Task/Collections/Visual-FoxPro/collections.visual
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
LOCAL loColl As Collection, o, a1, a2, a3
|
||||
a1 = CREATEOBJECT("animal", "dog", 4)
|
||||
a2 = CREATEOBJECT("animal", "chicken", 2)
|
||||
a3 = CREATEOBJECT("animal", "snake", 0)
|
||||
loColl = NEWOBJECT("Collection")
|
||||
loColl.Add(a1)
|
||||
loColl.Add(a2)
|
||||
loColl.Add(a3)
|
||||
|
||||
FOR EACH o IN loColl FOXOBJECT
|
||||
? o.Name, o.Legs
|
||||
ENDFOR
|
||||
|
||||
DEFINE CLASS animal As Custom
|
||||
Legs = 0
|
||||
|
||||
PROCEDURE Init(tcName, tnLegs)
|
||||
THIS.Name = tcName
|
||||
THIS.Legs = tnLegs
|
||||
ENDPROC
|
||||
|
||||
ENDDEFINE
|
||||
Loading…
Add table
Add a link
Reference in a new issue