[Swift-devel] need @extractfloat

Ben Clifford benc at hawaga.org.uk
Thu Jun 19 06:21:25 CDT 2008


Here's how to do it both with the apparently buggy-enough to work for you 
@extractint or using readData. Using readData is probably the better way.

$ cat double.txt 
3.1415


$ cat double.swift 

double d = @extractint("double.txt");
trace(d);


$ swift double.swift
Swift svn swift-r2070 (Swift modified locally) cog-r2038

RunID: 20080619-1213-rx5fbjlg
Progress: 
SwiftScript trace: 3.1415
Final status: 


$ cat double2.swift 
float d = readData("double.txt");
trace(d);


$ swift double2.swift 
Swift svn swift-r2070 (Swift modified locally) cog-r2038

RunID: 20080619-1220-nbmvzfi0
Progress: 
SwiftScript trace: 3.1415
Final status: 



-- 




More information about the Swift-devel mailing list