Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Un-ALINES()
Message
 
À
02/04/2003 13:22:28
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00773112
Message ID:
00773269
Vues:
9
Hi Mike

Here is my function that I use for this purpose. It is based on a solution provided by someone in the UT (it might have been Christof Lange).

SetCount() just sets the form property "nCount" to Zero. IncCount() just increments "nCount".
LParameter laArray
ThisForm.SetCount(0)
Return Textmerge(Replicate('<<laArray[ThisForm.IncCount()]>><<Chr(13)+Chr(10)>>',Alen(laArray)))
Simon

>Hi all!
>
>Thanks to Glenn Domeracki's un-intellisense thread for the inspiration for the name of this Un-alines thread.
>
>I've got a little task to perform: read in an INI file, change one line and save the file.
>
>So, I started with ... (LOCAL declarations omitted for brevity)
>
>
lcINIFile=FILETOSTR("INIFile.INI")
>=alines(laINIFile,m.lcINIFile)
>lnRow=ascan(laINIFile,"onerow",-1,1)
>laINIFile[m.lnRow,1]=strtran(laINIFile[m.lnRow,1],"=","=subdir\")
>
>I know I can rebuild the string from the array. It just seems there should be an UNALINES() function to go along with the existing ALINES() function.
>
>lcINIFile=UNALINES(laINIFile)
>
>I guess I could just do this too...
>
>
lcINIFIle=FILETOSTR("INIFile.INI")
>=strtran(m.lcINIFile,"onerow=","onerow=subdir\")
>STRTOFILE(m.lcINIFile,"INIFile.INI")
>
>Is that the best way?
Simon White
dCipher Computing
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform