Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connected to Network
Message
From
11/10/1998 04:50:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00144975
Message ID:
00145730
Views:
34
>>for i=1 to words(lcBuffer, chr(1))
>> _diskovi=_diskovi+_delim+WordNum(lcBuffer, i, chr(1))
>> _delim=";"
>>endfor
>>retu _diskovi
>>
>>
>Actually, I hadn't thought about using CHRTRAN() to convert the CHR(0) to CHR(1) or I would've used foxtools. I knew that CHR(0) wouldn't work as the delimeter passed to either Words() or WordNum(). You do have me pegged, don't you?

Ummm... despite my speaking English for more than thirty years now, the meaning of "pegged" escapes me, the CD with the Webster would shut off Santana ("Ko je konobar - Milinko" [who is the waiter? Milinko] aka "Oye como va"), the girls are asleep and they took the paper dictionary... anyway, if it won't work with chr(0), it will work with something else. The idea came just naturally - the basic (or c++) instinct is that nothing will stop me when I decide to use a FoxTools function :).

>>BTW, what's the scope of Declare API command? For how long does an API function stay declared, and if it remains, when should it be unloaded? I've seen some people here clearing them out, but it seems to have only CLEAR DLLS which clearse them ALL out, unlike other CLEAR commands which know how to be selective.
>
>The scope, AFAIK, is global. Once declared, the function becomes part of the language almost (but not quite :-)). It stays resident until a CLEAR DLLS is issued. You're right, you cannot clear a specific DLL in VFP. Personally, just because of my style, and because they do use resources, any object that uses an API call has CLEAR DLLS in its .Destroy method. Depending on the usage, I may declare functions in the .Init of the object (if the object will complete its work before any other object is referenced) or in the needed functions, if the object is to exist for a longer period of time. In most cases, this prevents the possibility of the DLLs being cleared by another object.

Phew. Not nice at all. We'd probably have to have some internal flag AllowedToClearDLLS somewhere, or just to Clear DLLs after every call of a function which uses them. I'm just wandering which approach is worse - to let them all hang around and take up memory, hoping they end up in swap file if rarely used, or loading them every time, having the overhead of loading. Or do they load at all? They're mostly part of the OS, so we're actually calling things which may already be loaded. But then, why should they be using up memory, except for the parameter blocks? Or was it the conversion between VFP and C data types?

Just checked VFP6 hhelp - it's still the same: load one at a time, dump 'em all at once. Anyway, I think we've developed a nice practice of using the .dlls only in those functions where they are loaded. So if they are cleared, they're reloaded when needed. We'd just need a neat strategy for picking the right moment to clear. Seems to be I've gone into strategy again.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform