Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Your opinion
Message
 
 
À
30/11/2005 17:02:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01073478
Message ID:
01073968
Vues:
10
Flat file reassembler!
Reconnects two character lines by eliminating Line1 CR and forcing CR after Line2 (max len 152)...
This is not useful except for it's original intent!

>Hello,
>
>What is the purpose of this following codes, your opinion ?
>
>Tia
>
>
>Parameters tcOpenFile, tcFileName
>Local lcFileName, lnHandle, lnOHandle, lcFileIn, lnI
>
>lcFileIn = ""
>lnI 	 = 1
>lnOHandle = FOpen( tcOpenFile )
>
>If File( tcFileName )
>	Erase ( tcFileName )
>Endif
>lnHandle = Fcreate( tcFileName )
>
>Do While Not FEof( lnOHandle )
>	lcFileIn = lcFileIn + FGets( lnOHandle)
>
>	If !Empty(lcFileIn)
>		lcFileIn = Left(lcFileIn, Len(lcFileIn) - 1 )
>	Endif
>
>	If lnI % 2 = 0
>		If Len(lcFileIn) > 152
>			lcFileIn = Left(lcFileIn, 151) + Chr(13)
>		Endif
>		=Fwrite( lnHandle, lcFileIn )
>		lcFileIn = ""
>	Endif
>	lnI = lnI + 1
>Enddo
>=FClose( lnOHandle )
>=FClose( lnHandle )
>
Edgar L. Bolton, B.S. B.B.A.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform