Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
STRTRAN not working
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00799472
Message ID:
00799478
Vues:
21
>Any idea why the substitute is not working?
>

The line
IF ASC(SUBSTR(lccode,i,1))=13 .or. ASC(SUBSTR(lccode,i,1))=13
prevent the code to execute...


>
>
>lcline=""
>lccode="COPY %1 <<IMPORTPATH>> <<IMPORTFILE>>"
>BG_ACCUWIN="C:\FOXPRO\TMP\"
>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)
>        ? lcline
>        IF "<<IMPORTPATH>>" $ lcline
>		STRTRAN(lcline,"<<IMPORTPATH>>",BG_ACCUWIN)
>        ENDIF
>        IF "<<IMPORTFILE>>" $ lcline
>		STRTRAN(lcline,"<<IMPORTFILE>>","ACCUWIN.TXT")
>        ENDIF
>	    i = i+1
>    ELSE
>        lcline=lcline+SUBSTR(lccode,i,1)
>    ENDIF
>	=FPUTS(m.handle,lcline)
>ENDFOR
>=FCLOSE(m.handle)
>MODIFY COMMAND test.txt
>
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform