Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FGETS
Message
From
31/05/2001 17:45:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: FGETS
Miscellaneous
Thread ID:
00513455
Message ID:
00513478
Views:
16
>I forgot to change the title. Ignor that.
>sherry

Good because fgets has a bug with long lines (8192 as I remember).
Memo fields are ignored-skipped with 'appen from', 'copy to' commands.
alines comes to mind at first but would fail on long strings too.
You might choose one of multipl ways :
1) Create a cursor with n columns each c(250) -n could be calculated as :
ceiling(Fsize(YourTextFile)/Occurs(chr(13),FileToStr(YourTextFile)))
append from type sdf
scan..endscan to process
2) Directly process with lowlevel using fread() (my preference)
3) Create a cursor with one memo field
append memo from yourtxt
process memo
4)FileToStr() and process string
etc
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform