You are not logged in.
Pages: 1
Topic closed
I'm using read function to receive data from socket.
Read(socket, buffer, 1000);
Here is an exapmle of recived data.
+00.014 +00.321 +09.878 +00.000 -00.007 -00.001 +01.076 +08.606 +20.051 000016350 146803493
Is it posible to separate each nuber by using GetExtDouble();??? How??
Offline
Hi,
I would suggest to use
long Read(long handle, string data[], long count)
to read the data from socket directly to String variable.
Data can be parsed using String oriented functions such as:
long strfind(str,substr); // find space occurrence
string strsub(str,idx,len); // parse number
Hope it will guide you to the right direction.
If you require any further information, let me know.
Regards, Tomas
Offline
Thank you.
Any suggestions how to convert resulting string to double?
Offline
Glad I could help.
Look for
double str2double(str)
in order to convert string to double.
Regards, Tomas
Offline
Pages: 1
Topic closed