Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code it better
Message
 
 
To
19/08/2008 13:29:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01339981
Message ID:
01340021
Views:
11
>>If I recall correctly, PEMSTATUS works quicker than TYPE. So, if you need it in a loop you may use PEMSTATUS over TYPE (we do need some speed measurements here, I may be wrong).
>>
>But if the n is big, I wonder several calls to PEMSTATUS can still have perfromance advantage over a single call to TYPE.
>

I see now better the point of the original question. I guess it's more theoretical than practical, though, or we're talking about some Treeview structure?

Anyway, we need to test it, I guess for the case like this TYPE may be better (one function call versus N function calls).

>>Also I use the other way around TYPE <> "U". Not sure if there is any difference at all, but in my opinion it's clearer this way.
>>
>em.. I got use to placing constant or manifest constant on the left side in a comparison expression... can't recall since when, something like I read an article which convince me it is better that way.
>Btw, when I search my drive with code reference for codes which I type() test object item, I find myself lucky because I have the above habit.
>I search for "[O] = TYPE(" and I got quite an exact list of what I am interested in.
>
>If I were placing the "U" like you do on the right side of the operator ... then the best way I can think of is to search for "TYPE(" (I wonder code reference supports regular expression...), but then I will have a long list of type() testing for all TYPEs. <g>

Good point! Ok, if that's the case you're certainly correct.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform