Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using FWRITE() to add characters to text file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01081854
Message ID:
01081873
Views:
13
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?
Previous
Reply
Map
View

Click here to load this message in the networking platform