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
32
Task/Enumerations/Lingo/enumerations-1.lingo
Normal file
32
Task/Enumerations/Lingo/enumerations-1.lingo
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
-- parent script "Enumeration"
|
||||
|
||||
property ancestor
|
||||
|
||||
on new (me)
|
||||
data = [:]
|
||||
repeat with i = 2 to the paramCount
|
||||
data[param(i)] = i-1
|
||||
end repeat
|
||||
me.ancestor = data
|
||||
return me
|
||||
end
|
||||
|
||||
on setAt (me)
|
||||
-- do nothing
|
||||
end
|
||||
|
||||
on setProp (me)
|
||||
-- do nothing
|
||||
end
|
||||
|
||||
on deleteAt (me)
|
||||
-- do nothing
|
||||
end
|
||||
|
||||
on deleteProp (me)
|
||||
-- do nothing
|
||||
end
|
||||
|
||||
on addProp (me)
|
||||
-- do nothing
|
||||
end
|
||||
34
Task/Enumerations/Lingo/enumerations-2.lingo
Normal file
34
Task/Enumerations/Lingo/enumerations-2.lingo
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
enumeration = script("Enumeration").new("APPLE", "BANANA", "CHERRY")
|
||||
|
||||
put enumeration["BANANA"]
|
||||
-- 2
|
||||
|
||||
-- try to change a value after construction (fails)
|
||||
enumeration["BANANA"] = 666
|
||||
put enumeration["BANANA"]
|
||||
-- 2
|
||||
|
||||
-- try to change a value after construction using setProp (fails)
|
||||
enumeration.setProp("BANANA", 666)
|
||||
put enumeration["BANANA"]
|
||||
-- 2
|
||||
|
||||
-- try to delete a value after construction (fails)
|
||||
enumeration.deleteAt(2)
|
||||
put enumeration["BANANA"]
|
||||
-- 2
|
||||
|
||||
-- try to delete a value after construction using deleteProp (fails)
|
||||
enumeration.deleteProp("BANANA")
|
||||
put enumeration["BANANA"]
|
||||
-- 2
|
||||
|
||||
-- try to add a new value after construction (fails)
|
||||
enumeration["FOO"] = 666
|
||||
put enumeration["FOO"]
|
||||
-- <Void>
|
||||
|
||||
-- try to add a new value after construction using addProp (fails)
|
||||
enumeration.addProp("FOO", 666)
|
||||
put enumeration["FOO"]
|
||||
-- <Void>
|
||||
Loading…
Add table
Add a link
Reference in a new issue