Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
put {name:"Fluffy", type:"Rabbit", color:"White"} into animal
|
||||
put "Carries a watch" into animal's habits
|
||||
|
||||
put "The animal: " & animal
|
||||
put "The keys: " & keys of animal
|
||||
put "The values: " & animal's values
|
||||
// Keys and Values
|
||||
put ,"All Properties:"
|
||||
repeat with each [key,value] in animal
|
||||
put !"Key: [[key]] Value: [[value]]"
|
||||
end repeat
|
||||
|
||||
// Keys only
|
||||
put ,"Keys:"
|
||||
repeat with each [key] in animal
|
||||
put key
|
||||
end repeat
|
||||
|
||||
// Values only
|
||||
put ,"Values:"
|
||||
repeat with each [,value] in animal
|
||||
put value
|
||||
end repeat
|
||||
|
||||
// Using an iterator
|
||||
put ,"Treating the property list as an iterator:"
|
||||
put animal's nextValue -- calling any of the "next" functions begins iteration
|
||||
put animal's nextKeyValue
|
||||
put animal's nextKey
|
||||
put animal's nextKeyValue
|
||||
put animal's nextValue -- walking off the end returns a unique endValue
|
||||
Loading…
Add table
Add a link
Reference in a new issue