RosettaCodeData/Task/Input-loop/FutureBasic/input-loop.basic
2023-07-01 13:44:08 -04:00

20 lines
347 B
Text

include "NSLog.incl"
local fn ReadTextFile
CFURLRef url
CFStringRef string
url = openpanel 1, @"Select text file..."
if ( url )
string = fn StringWithContentsOfURL( url, NSUTF8StringEncoding, NULL )
if ( string )
NSLog(@"%@",string)
end if
else
// user cancelled
end if
end fn
fn ReadTextFile
HandleEvents