At 14:14 2018-04-05, mbsoftwaresoluti...@mbsoftwaresolutions.com wrote:
On 2018-04-05 13:19, Gene Wirchenko wrote:
At 12:43 2018-04-04, mbsoftwaresoluti...@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:
  1) 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


_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/29d138db30be6a0ec7e3d56f9a5c47b6@mtlp000083
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to