Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP versus C++
Message
From
27/10/2003 12:14:21
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00842594
Message ID:
00843053
Views:
29
Hi Peter,

The problem is ALINES() limit to 65000 elements ( VFP9 resolve it ? ) !

But with a little work is possible split the file,
process the parts and merge the results

------
do while not feof( lnHR )
lcC = fgets( lnHR )
lnFieldsFound = alines( laField, lcC, chr(9) )
for ln = 1 to lnFieldsFound
* manipulate laField[ ln ]
next
enddo
------

the natural solution is with APPEND FROM TEXT_TAB, but it not support memo and then with long strings is need a low level file manipulations.

however, if you want speed
- use m. prefix for read a variable
- donnot use unnecessary temporary variable
( especially if they are stringhe much long )
do while !feof( m.lnHR )
  for ln = 1 to ALINES( laField, fgets( m.lnHR ), chr(9) )
      *  manipulate laField[ m.ln ]
  next 
enddo
if is sure that FSIZE(m.lnHR) is limited to 16MB and max lines limited to 65000, try:
FOR j=1 TO ALINES(aRows,FILETOSTR(filename))
  for ln = 1 to ALINES( laField, aRows[ m.j ], chr(9) )
    *  manipulate laField[ m.ln ]
  next  
NEXT
Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform