Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with primary key
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01035448
Message ID:
01035642
Views:
20
>I see your point about the consistency. One of the areas I have been paying a lot of attention to lately is refactoring, and focusing on code clarity and self documenation. From that point of view, I think that
DTOS()
is easier to read than
DTOC(,1)
To Preserve consistency, what I would do is create the following function
Function TTOS(tdDate)
>Return TTOC(tcDate,1)
This way, there would be a matching TTOS and DTOS function, with both being easy to read, and not requiring the ,1 parameter, which is in no way self documenting.

Both structures would certainly work, but given a choice, I would choose the self documenting form over a parameter that I would have to look up when I see it. You may be able to remember all of these parameters offhand, but I, unfortunately, cannot.
>

I don't see a problem in using either of them. I would stay away from TTOS() UDF or any other in the index keys because cure would be worse than decease.

--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform