Input loop: Difference between revisions
→{{header|FutureBasic}}
Line 1,449:
=={{header|FutureBasic}}==
Note: This code goes beyond simply specifying the file to open. It includes a dialog window that allows the user to select a text file to read. The entire contents of the file are read in at once, rather than line by line.
<lang futurebasic>include "NSLog.incl"
local fn ReadTextFile
CFStringRef string
url = openpanel 1, @"Select text file..."
string = fn StringWithContentsOfURL( url, NSUTF8StringEncoding, NULL )
else▼
▲ if ( h )
// user cancelled
end if▼
▲ end if
▲else
▲end if
end fn
fn ReadTextFile
HandleEvents</lang>
=={{header|gnuplot}}==
|