Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File into memory
Message
 
 
To
16/02/2011 13:53:24
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01500424
Message ID:
01500426
Views:
113
Try
lcString = ""
DO WHILE NOT FEOF(gnInFile)

	lcChar = FREAD(gnInFile,1)
	
	IF lcChar = "~" 
		=FPUTS(gnOutFile, lcString)
	ELSE
		lcString = lcString + lcChar 
	ENDIF

ENDDO
>I wrote a prg that opens a text file, reads each line, parses the line and writes it into another file. the program works fine but it takes to long.
>is there a method that i can accomplish this quicker.
>A file that is about 250,000 lines takes almost 2 hours to process. Below is my prg and a few lines of the data from the input file.
>the program creates a new line after every tilde.
>
>the parameter are the file handles created with a Fopen() and fcreate()
>
<snip>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform