Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Love Note
Message
From
12/05/2009 15:14:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
12/05/2009 14:35:31
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01398424
Message ID:
01399468
Views:
75
If you are not worried with d prefix when it is a datetime then you are not really using a type prefix but just a mnemonic. I prefer the field name itself as the mnemonic.
PS: No I wouldn't store numeric data as character.
Cetin

>You've never worked in a system where numeric entries are (sometimes) stored as character data? I wouldn't design such a system, in normal circumstances, but they do exist, and they do need conversion or fixing.
>
>Regarding datetimes vs dates: when I am working with the field in VFP, hitting against SQL, having the d in front tells me not to worry about the time component. Useful information.
>
>And, of course, finding examples where there would be no confusion is easy. But proving redundancy for easy examples does not prove the general case, which has enough exceptions to the general statement to make protecting against the exceptions a worthwhile practice.
>
>Hank
>
>>>Hi Cetin,
>>>
>>>prefixes tell me the type of the variable. Could it be mis-prefixed? Of course, it's dynamic type assignment in VFP. However, for all practical purposes, and that's my point, being practical, hungarian notation tells me the type of the variable.
>>>
>>>Hank
>>
>>That is a misperception. It sounds like it does but not and generally just serves as redundancy. ie:
>>What is the prefix for Northwind Employees.BirthDate? D? On VFP yes but as soon as it is upsized it is T. Why would I think BirthDate is something other than date or datetime and prefix it? D is not helping me either. If I do it T, then it is not till upsizing. Or why would I ever prefix CompanyName? Or nAmount - is it an integer, float, double, money ...? Does it meatter? Yes it does and n doesn't tell me which one it is. If I do it i for integer and later decide to make a double would I find and replace all occurences? In real world applications database column names are not prefixed with types. That is something I hear from VFP developers only. Some weird naming conventions like customer_cCompanyName :) Redundancy. Recently I experienced it first hand that prefixing worked against me where date fields become datetime after upsizing (as I said it sticked to me as a habit, because of posting on forums, unfortunately and I use it).
>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform