Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
FGETS() to know if linefeed
Hi All,
I have a text file that I open and read data from. The problem is that its format is not in a form of a dellimited text file. Its kind of a report that is exported to a text file. Though this is the case, I have found that fields are in a fixed-width. So , I try to FGETS() each line, get the string data from it, count the fixed-width characters I need and do some processing. But some lines, FGETS() returns empty twice or thrice (but if text file is opened in say notepad.exe, actual line only has spaces in them). Could it be that those "spaces" are linefeeds or carriage returns? But when I try to see if they are, FREAD() returns CHR(32). I need to just scan all the lines in a text file, from the return value get n characters from it. Each "detail record" I know for sure is x lines, but between each "detail record" I dont know how many "spaces"/linefeeds/carriage returns. Any help would do, thanks!
Suivant
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