xupengkun
2nd December 2009, 04:03
Use the following two functions
seq.fstat.local(pcfile.f,v_byte)
seq.read.local(v_string,v_value,ret)
the v_byte return 61718,but the v_vaue only return 50000
Whether the function seq.read.local is not supported > 50000
4558
Who can tell me to solve?
norwim
2nd December 2009, 08:43
Hi there,
from the tools help and some threads here I found rather different statements as to the maximum length of string variables.
I never had any trouble in this respect and neither do you have to have them :-)
Why do you use seq.read.local in the first place?
From what I saw in your code, you are splitting up your buffer by locating newlines and then working record for record.
This is exactly what seq.gets does for you automatically - you can process each line one by one.
Another useful function then is string.scan.
Let's assume you have a string called buff containing "ITEMNAME;300;green;3.4"
string item(30) fixed
long height
string color(20)
double weight
string.scan(buff,"%s;%d;%s;%20.6f",item,height,color,weight)
would take care of splitting up the string into the correctly defined variables.
hth
Norbert