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 04:30:51
 
 
To
25/10/2000 11:46:00
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00431993
Message ID:
00434449
Views:
21
>>I´ve tried it, and it´s fast enough, thats for sure.
>>
>>As I wrote earlier,there is quite bit more to it...
>>For reasons better not talked about, I have to step through the file SUBSTR() by SUBSTR() in order to read the values between the commas, all in quotes.
>>I then have to look up the SAS INFORMAT (16.3,16.5,13.3 a.s.o. if you are familiar with SAS) in a table, and mimick the behaviour of SAS.
>>16.3 seems to mean divide by 100, if it´s not already a decimal value, 16.5 indicates a division by 10000, which would apply to nanoseconds for instance.
>>
>>I guess what I´m trying to get at here is, I sort of need something like
>>
>>
>>DO CASE
>>>>CASE cFormat="16.3"
>>>>>>oReg.Pattern ='("\d*)(\d{2}")'
>>>>>>lcReplacePattern='$1.$2'
>>
>>>>CASE cFormat="16.5"
>>>>>>oReg.Pattern =????
>>>>>>lcReplacePattern=?????
>>ENDCASE
>>oReg.Replace(cVar,lcReplacePattern)
>>
>>Where do I find info on the Pattern property? How does it work for a division by 1000,10000?
>>
>>And finally why does my text show up in bold, ´cause I don´t mean to shout.
>>
>>Thank you for taking the trouble.
>
>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 Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform