Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
local fn MyArraySortFunction( obj1 as CFTypeRef, obj2 as CFTypeRef, context as ptr ) as NSComparisonResult
|
||||
NSComparisonResult result = NSOrderedDescending
|
||||
if len(obj1) >= len(obj2) then result = NSOrderedAscending
|
||||
end fn = result
|
||||
|
||||
void local fn DoIt
|
||||
CFStringRef string1 = @"abcd", string2 = @"abcdef", s
|
||||
|
||||
if len(string1) >= len(string2)
|
||||
print string1,len(string1)
|
||||
print string2,len(string2)
|
||||
else
|
||||
print string2,len(string2)
|
||||
print string1,len(string1)
|
||||
end if
|
||||
|
||||
print
|
||||
text ,,,,, 85
|
||||
|
||||
CFArrayRef strings = @[@"abcd",@"123456789",@"abcdef",@"1234567"]
|
||||
strings = fn ArraySortedArrayUsingFunction( strings, @fn MyArraySortFunction, NULL )
|
||||
for s in strings
|
||||
print s,len(s)
|
||||
next
|
||||
end fn
|
||||
|
||||
window 1
|
||||
|
||||
fn DoIt
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue