Anuraag
2nd November 2004, 08:54
Hi !
I have a script in which I wish to read some values from the txt file lying at the client side for which I am using seq.read.local() function. The record length is varying and not fixed. The problem occurs when I read the value from file to a string variable of 255 chr, the data being read includes the next line also if the line being read is less than 255 char. Is there any way to read the line upto the end of line irrespective of it's length. The script I am using is as below for reference:
string data(255)
filename = "c:\scandata"
ret = EXEC_DLL_FUNCTION ("ottdllbw", "seq.open.local", fp, filename, "r", 2)
while not (seq.eof(fp)) = 0
EXEC_DLL_FUNCTION ("ottdllbw", "seq.read.local", ret, data, 225, fp)
if ret <> 0 then
break
endif
.....
.....
.....
endwhile
I have a script in which I wish to read some values from the txt file lying at the client side for which I am using seq.read.local() function. The record length is varying and not fixed. The problem occurs when I read the value from file to a string variable of 255 chr, the data being read includes the next line also if the line being read is less than 255 char. Is there any way to read the line upto the end of line irrespective of it's length. The script I am using is as below for reference:
string data(255)
filename = "c:\scandata"
ret = EXEC_DLL_FUNCTION ("ottdllbw", "seq.open.local", fp, filename, "r", 2)
while not (seq.eof(fp)) = 0
EXEC_DLL_FUNCTION ("ottdllbw", "seq.read.local", ret, data, 225, fp)
if ret <> 0 then
break
endif
.....
.....
.....
endwhile