Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Always better to ...?
Message
From
26/02/2000 13:44:54
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Always better to ...?
Miscellaneous
Thread ID:
00338054
Message ID:
00338054
Views:
64
Hi All!

I often wonder what is the most efficient way to code things. For instance, it seems that to alltrim(upper(fieldname)) must always be slower than upper(alltrim(fieldname)). I'm assuming in the first example, that the upper will operate on all characters in the field. In the second, upper will only act on the remaining characters. So, I always use the second method.

How about this code...
IF ! USED("sometable")
SELECT 0
USE sometable
ELSE
SELECT sometable
ENDIF

Wouldn't it ALWAYS be better to ...?

IF ! USED("sometable")
USE sometable in 0
ENDIF
SELECT sometable

Now oddly enough, from speed trials I did, I'm not seeing much if any difference, and either piece of code may win the race, however, less typing means less mistakes.

Anyone care to add other little bits of code? I mean, nothing more than 10 lines.

Seems more appropriate than some other threads up here <s>...
Next
Reply
Map
View

Click here to load this message in the networking platform