Information générale
Catégorie:
Codage, syntaxe et commandes
>>I am parsing Medical HL7 format records. I'm using fgets() to read them as a flat file. Some of the record formats have interpretations of the data that exceeds the 8192 maximum length of the fgets. When I get the data if the length is less than 8192 then it is obvious the length is what it is. If the length of the data is 8192 how can I tell if the fgets completed because of a CR or there is more data for that record?
>
>You cannot tell a difference from FGETS() but you can use FSEEK(nFileHandle,0) to track a file pointer in a file. The difference between previous an current value should allow you to determine both cases.
I'm not understanding. I use the len() function to see if the data is less that 8192. If the len is 8192 i need to determine of the next character to read is part of the record just read or the start of the next record.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement