Routine Name:	readfile

Description:	Reads a line of data from an opened ASCII file.

Usage:		readfile filename -linemode

		-linemode	option indicating that entire line of file
				should be returned as a single string, rather
				than as a list of arguments (the latter is the
				default)

		filename	name of ascii file (must be already opened
				using r option of openfile routine)

Example:
	openfile test w
	writefile test 1.0 2.0 3.0
	writefile test 4.0 5.0 6.0
	writefile test 7.0 8.0 9.0
	closefile test
	openfile test r
	// 1st line as 3 args:
	echo {readfile test}
	// gives: 1.0 2.0 3.0
	// 2nd arg of 2nd line:
	echo {getarg {readfile test} -arg 2}
	// gives: 5.0
	// 3d line as one argument:
	echo {getarg {readfile test -l} -arg 1}
	// gives: 7.0 8.0 9.0

	// using the file Vm1 generated by the MultiCell demo
	function processline
	   int step = {argv 1}
	   float Vm = {argv 2}
	   echo "Time step: "{step}
	   echo "Membrane potential: "{Vm}
	end

	openfile Vm1 r
	processline {readfile Vm1}
	processline {readfile Vm1}
	.
	.
	closefile Vm1

Notes:		The readfile routine does not alter the file in any way.

See also:	openfile, closefile, listfiles, readfile, getarg

