Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
STRTRAN not working
Message
De
12/06/2003 14:46:51
 
 
À
12/06/2003 14:37:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00799472
Message ID:
00799513
Vues:
29
This message has been marked as the solution to the initial question of the thread.
Tracy,

You've got to store the result of strtran() to a string variable...see lines near bottom...

< update >But since I'm not sure what you're trying to do, I'm not sure if the syntax within the strtran() is right either.

>This is even stranger, it obviously makes the change at the top of the code and at the end of the code, but it writes it to the file without the change:
>
>
>clear
>BG_ACCUWIN="C:\FOXPRO\TMP\"
>lcline=""
>lccode="REM Test.txt"+CHR(13)
>lccode=lccode+"COPY %1 <<IMPORTPATH>> <<IMPORTFILE>>"
>?STRTRAN(lccode,"<<IMPORTPATH>><<IMPORTFILE>>",BG_ACCUWIN+"ACCUWIN.TXT",1)
>?STRTRAN(lccode,"<<IMPORTPATH>> <<IMPORTFILE>>",BG_ACCUWIN+"ACCUWIN.TXT",1)
>m.handle=FCREATE("test.txt")
>FOR i = 1 TO LEN(lccode)
>	IF ASC(SUBSTR(lccode,i,1))=13 .OR. ASC(SUBSTR(lccode,i,1))=13
>		lcline=lcline+CHR(13)+CHR(10)
>	ELSE
>		lcline=lcline+SUBSTR(lccode,i,1)
>	ENDIF
>ENDFOR
lcLine = STRTRAN(lcline,"<<IMPORTPATH>><<IMPORTFILE>>",BG_ACCUWIN+"ACCUWIN.TXT",1)
lcLine = STRTRAN(lcline,"<<IMPORTPATH>> <<IMPORTFILE>>",BG_ACCUWIN+"ACCUWIN.TXT",1)
>=FPUTS(m.handle,lcline)
>=FCLOSE(m.handle)
>MODIFY COMMAND test.txt
>
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform