[Taoscript-lang] New read() function: read("<<EOF") reads multi-line until "EOF" is met in a single line!

0 views
Skip to first unread message

Limin Fu

unread,
Jun 6, 2005, 7:31:15 AM6/6/05
to Tao ML
Hi!

To solve the problem pointed out be Jupp, I have enable read() function to read multi-lines until a user-define "EOF" is met in a _single_ line. The syntax is like the following:

# from standard input:

string = read( "<<MyEOF" ); # the user-defined "EOF" should be prefixed by "<<"
read( string, "<<MyEOF" );  # the order of the parameters is not important,
                            # but should not be more than 2.
# from files:

string = file.read( "<<MyEOF" );
file.read( string, "<<MyEOF" );

The new binaries for linux can be downloaded from cvs in SF:
http://cvs.sourceforge.net/viewcvs.py/taoscript/TaoScript/bin/
(pay attention to the time tag of the files)

Cheers,

Limin
Reply all
Reply to author
Forward
0 new messages