Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Arrays/AppleScript/arrays-1.applescript
Normal file
2
Task/Arrays/AppleScript/arrays-1.applescript
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
set empty to {}
|
||||
set ints to {1, 2, 3}
|
||||
7
Task/Arrays/AppleScript/arrays-10.applescript
Normal file
7
Task/Arrays/AppleScript/arrays-10.applescript
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
use AppleScript version "2.4" -- Mac OS 10.10 (Yosemite) or later.
|
||||
use framework "Foundation" -- Allows access to NSArrays and other Foundation classes.
|
||||
|
||||
set myList to {1, "foo", 2.57, missing value, {1, 2, 3}} -- AppleScript list.
|
||||
set myNSArray to current application's NSArray's arrayWithArray:myList -- Bridge the list to an NSArray.
|
||||
set arrayLength to myNSArray's |count|() -- Get the array's length using its 'count' property.
|
||||
--> 5
|
||||
1
Task/Arrays/AppleScript/arrays-2.applescript
Normal file
1
Task/Arrays/AppleScript/arrays-2.applescript
Normal file
|
|
@ -0,0 +1 @@
|
|||
set any to {1, "foo", 2.57, missing value, ints}
|
||||
5
Task/Arrays/AppleScript/arrays-3.applescript
Normal file
5
Task/Arrays/AppleScript/arrays-3.applescript
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
set any to {1, "foo", 2.57, missing value, {1, 2, 3}}
|
||||
set beginning of any to false
|
||||
set end of any to Wednesday
|
||||
return any
|
||||
--> {false, 1, "foo", 2.57, missing value, {1, 2, 3}, Wednesday}
|
||||
3
Task/Arrays/AppleScript/arrays-4.applescript
Normal file
3
Task/Arrays/AppleScript/arrays-4.applescript
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
set any to {1, "foo", 2.57, missing value, {1, 2, 3}}
|
||||
set any to false & any & Wednesday
|
||||
--> {false, 1, "foo", 2.57, missing value, {1, 2, 3}, Wednesday}
|
||||
3
Task/Arrays/AppleScript/arrays-5.applescript
Normal file
3
Task/Arrays/AppleScript/arrays-5.applescript
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
set any to {1, "foo", 2.57, missing value, {1, 2, 3}}
|
||||
item -1 of any --> {1, 2, 3}
|
||||
items 1 thru 3 of any --> {1, "foo", 2.57}
|
||||
2
Task/Arrays/AppleScript/arrays-6.applescript
Normal file
2
Task/Arrays/AppleScript/arrays-6.applescript
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
set any to {false, 1, "foo", 2.57, missing value, {1, 2, 3}, Wednesday}
|
||||
number 2 of any -- 2.57 (ie. the second number in the list)
|
||||
2
Task/Arrays/AppleScript/arrays-7.applescript
Normal file
2
Task/Arrays/AppleScript/arrays-7.applescript
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
set any to {false, 1, "foo", 2.57, missing value, 5, 4, 12.0, 38, {1, 2, 3}, 7, Wednesday}
|
||||
integers from text 1 to list 1 of any --> {5, 4, 38}
|
||||
3
Task/Arrays/AppleScript/arrays-8.applescript
Normal file
3
Task/Arrays/AppleScript/arrays-8.applescript
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
count any -- Command.
|
||||
length of any -- Property.
|
||||
number of any -- Property.
|
||||
2
Task/Arrays/AppleScript/arrays-9.applescript
Normal file
2
Task/Arrays/AppleScript/arrays-9.applescript
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
count any's reals
|
||||
length of any's integers
|
||||
Loading…
Add table
Add a link
Reference in a new issue