Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How does one determine if a value is a true INTEGER?
Message
From
26/10/2000 06:57:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/10/2000 04:30:51
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00431993
Message ID:
00434472
Views:
21
>>Peter,
>>First of all bold is not your fault :) It was a forgotten closing tag in message you replied first.
>>You can find all the details of RegExp object in vbscript5.chm. I was disappointed Ed didn't also write appending part in WSH :)
>>Now your situation is clearer and also why it runs slow. substr() is slow to operate on strings whether or not it has been enhanced in VFP6. Why don't you try lowlevel once. Or get into a cursor and do one replace all. Sorry I insist. Lowlevel and FLL versions can parse a file word-by-word in approx. 1 sec per Mb (500Mhz). I don't think substr() could catch it even in VFP6. If it can I promise to keep my mouth shut.
>>Best regards.
>>Cetin
>
>
>Cetin,
>Thank´s for your continuing interest. I´ve tried to avoid having to explain the whole scenario, because it´s quite complicated, and I didn´t want to bother you people with it -but, you asked for it:-)so here we go...
>
>The file I´m trying to read is off a NT performance monitoring system called NTSMF and contains:
>
>1. a bunch of so-called discovery or HEADER-records, which essentially are records that tell you about the DATA records later on in the file. Without the presence of these records, the data records are just so much gibberish.
>
>2. the DATA records, consisting of a
>RECORDHEADER wich tells you what is being measured (i.e. Memory,Cache a.s.o)
>
>the POSITION of the first data field in any given line in the file
>
>the NUMBER of DATAFIELDS that should be read
>
>and finally, in conjunction with the discovery records, you need to figure out which fields to NOT to read.
>
>So this is the reason, why I´m going through the file the way I am.
>
>I am sort of turning the record around and making it usable for a VFP/SQL server database.
>Sorry, but in this instance a cursor is not the way to go.
>
>Finally,which lowlevel and FLL functions are you referring to?
>BTW, thank´s for the additional info on WHS!

Peter,
If you think 'a cursor is not the way to go' I can't make you believe it's a way to go. Just think any file with a linelength of max 64770 bytes + CRLF (w/o memo usage) could be read into a cursor. RECORDHEADER line(s) would provide the info what the structure would be for another append cursor. IOW I say read file as if it was all 255*c(254) fields first (no loss since any char field in fox could hold unprintable chars like chr(0) and ch(255) too). If you provided RECORDHEADER + 10 lines as sampling in text format life would be easier for us to analyze :)
Lowlevel fuctions are fcreate(), fopen(), fread(), fgets(), fputs() etc. FLL was a special one I wrote for parsing text files to words-tokens.
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
Reply
Map
View

Click here to load this message in the networking platform