Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using FWRITE() to add characters to text file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01081854
Message ID:
01081873
Vues:
12
Hi Amy,

I used to love seeing what I could do with the lowlevel functions so I took a moment to investigate your problem. I think the only thing wrong with what you did was you didn't include an option after the filename in the fopen to indicate that the file could be written to.

Thus:
STRTOFILE( REPLICATE("~",4096), 'myjunk.txt')
xHand = FOPEN('myjunk.txt',12)        && notice the comma-12!
pnPos1 = FSEEK(xHand ,10,1)
pAddDelimiter = FWRITE(xHand ,'%')
pnPos2 = FSEEK(xHand ,501,1)
pAddDelimiter = FWRITE(xHand ,'%')
pnPos3 = FSEEK(xHand ,742,1)
pAddDelimiter = FWRITE(xHand ,'%')

pClose = FCLOSE(xHand )
DISPLAY MEMORY TO PRINTER NOCONSOLE 
Does that help any?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform