Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
local fn DoIt
|
||||
NSUInteger i
|
||||
CFStringRef s
|
||||
CFArrayRef x = @[@1, @2, @3, @1e11]
|
||||
CFArrayRef y = @[@1, @1.4142135623730951, @1.7320508075688772, @316227.76601683791]
|
||||
CFMutableStringRef mutStr = fn MutableStringWithCapacity(0)
|
||||
|
||||
CFURLRef desktopURL = fn FileManagerURLForDirectory( NSDesktopDirectory, NSUserDomainMask )
|
||||
CFURLRef url = fn URLByAppendingPathComponent( desktopURL, @"Array_to_file.txt" )
|
||||
|
||||
for i = 0 to 3
|
||||
if ( i < 3 )
|
||||
s = fn StringWithFormat( @"%ld \t", fn NumberIntegerValue( x[i] ) )
|
||||
MutableStringAppendString( mutStr, s )
|
||||
s = fn StringWithFormat( @"%.4f\n", fn NumberFloatValue( y[i] ) )
|
||||
MutableStringAppendString( mutStr, s )
|
||||
else
|
||||
s = fn StringWithFormat( @"%.e\t", fn NumberFloatValue( x[i] ) )
|
||||
MutableStringAppendString( mutStr, s )
|
||||
s = fn StringWithFormat( @"%.4e\n", fn NumberFloatValue( y[i] ) )
|
||||
MutableStringAppendString( mutStr, s )
|
||||
end if
|
||||
next
|
||||
fn StringWriteToURL( mutStr, url, YES, NSUTF8StringEncoding, NULL )
|
||||
print mutStr
|
||||
end fn
|
||||
|
||||
fn DoIt
|
||||
|
||||
HandleEven
|
||||
Loading…
Add table
Add a link
Reference in a new issue