At 14:14 2018-04-05, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2018-04-05 13:19, Gene Wirchenko wrote:
At 12:43 2018-04-04, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
VFP9 I don't see why folks would use Numeric(X,0) where X > 4 instead of an Integer field. Can you tell me why? I'm guessing it's leftover legacy design?
There are a couple that I can think of:
- Often, the numbers that I am dealing with are defined by number
of digits. For example, my app has work order numbers of up to 999999. "N(6)" covers that nicely and even documents it. 2) The column width in a browse for a column defined as N(?) will be just right (assuming the caption is not too wide). If I declare the column as integer, it will be wider than necesssary.
Interesting...thanks, Gene!
You are welcome.
3) Some other software might be expecting only values of the particular size and if you do not make sure that the values are that way, interesting things might happen. For example, N(4) is just right for four-digit numbers and that other program might be defined that way. If your declaration is 16-bit int ... <I am sure you have a good imagination>. COBOL has numbers declared by number of digits as does PL/I. There may be other languages.
Sincerely,
Gene Wirchenko