Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,20 @@
include "NSLog.incl"
void local fn Callback( n as NSInteger )
NSLog( @"Square root of %ld = %f", n, sqr(n) )
end fn
void local fn DoIt
NSUInteger i, count
CFArrayRef array = @[@1, @2, @3, @4, @5, @6, @7, @8, @9, @10]
count = len(array)
for i = 0 to count -1
fn Callback( fn NumberIntegerValue( array[i] ) )
next
end fn
fn DoIt
HandleEvents

View file

@ -0,0 +1,15 @@
include "NSLog.incl"
void local fn Callback( array as CFArrayRef, obj as CFTypeRef )
long value = intVal(obj)
NSLog( @"Square root of %ld = %f", value, sqr(value) )
end fn
void local fn DoIt
CFArrayRef array = @[@1, @2, @3, @4, @5, @6, @7, @8, @9, @10]
ArrayEnumerateObjects( array, @fn Callback, NULL )
end fn
fn DoIt
HandleEvents