|
Thats what I find funny! Their shop guys can, and do, work in both--
English and Metric, but they can't work in decimal inches. I had even
discussed changing to tenths of inches but man, that was met with blank
stares. :)
smorrison@xxxxxxxxxxxxxxxxxxx wrote:
Tell the shop floor to get with modern times. Toss all those old12/10/2008 6:53 PM
measurements and convert it all to metric! ;-)
Steven Morrison
Fidelity Express
"McKown, John" <John.Mckown@xxxxxxxxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
12/12/2008 09:30 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
To
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
cc
Subject
RE: storing fractions of inches in a data field
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Booth Martin
Sent: Friday, December 12, 2008 9:07 AM
To: Midrange Systems Technical Discussion
Subject: storing fractions of inches in a data field
I have an application that goes back to the 1970s which
measures stock
in inches and fractions. It was designed with 2 fields for every
measurement{ a field for whole inches and a field for
sixteenths. 3,
8 would be 3 1/2 inches, 3 9 would be 3, 9/16ths inches.
There is
some talk of modernizing that.
What would be another way of handling it? 3.5 and 3.5625 are
probably
not going to fly as a solution since it is too hard to teach on the
production floor (I am told).
Any ideas? Alternatives that might work? :)
--
---------------------------------
Booth Martin
Why change what "the floor" sees at all? If you want to store the
information in a "integer" type field, why not just say that the field
contains the size of the part in units of 1/16 inch? On input, you still
have the two fields. I don't know the names, so I'll just say that I1 is
the inches and I2 is the 16ths of an inch. Store the variable via
UPDATE table SET column=I1*16+I2;
When you want to display, get the column into a host variable and recalc
I1 and I2.
In C, I would do this as:
I1=column>>4; /* integer divide by 16 */
I2=column&&0x0F /* remainder after divide by 16 */
In COBOL, something like:
DIVIDE column BY 16 GIVING I1 REMAINDER I2.
--
John McKown
Systems Engineer IV
IT
Administrative Services Group
HealthMarkets(r)
Administrative Services Group
9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
john.mckown@xxxxxxxxxxxxxxxxx * www.HealthMarkets.com
Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential or proprietary information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message.
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.16/1842 - Release Date:
--
---------------------------------
Booth Martin
http://www.Martinvt.com
---------------------------------
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.