(42S) Convert Decimal to Tape Measure Fractions
09-16-2016, 02:28 PM (This post was last modified: 06-15-2017 01:16 PM by Gene.)
Post: #1
 Logan Member Posts: 129 Joined: Jul 2016
(42S) Convert Decimal to Tape Measure Fractions
Video demonstration here:

https://goo.gl/03Tj59

The program takes a decimal input (which the user can produce using the help of the interface) and then converts it to the precision specified by the user.

I won't say its perfect, and perhaps it duplicates some other program out there (I couldn't find it if there is one) and I welcome any feedback as this is one of my first programming attempts.
09-16-2016, 06:12 PM
Post: #2
 Dieter Senior Member Posts: 2,398 Joined: Dec 2013
RE: (42s) Convert Decimal to Tape Measure Fractions
(09-16-2016 02:28 PM)Logan Wrote:  I won't say its perfect, and perhaps it duplicates some other program out there (I couldn't find it if there is one) and I welcome any feedback as this is one of my first programming attempts.

Using the menu 42s system sure is a nice feature. As far as the conversion itself is concerned: this has been discussed here before, the last time in January in this thread for the 41-series. Maybe the underlying algorithm can be useful.

Dieter
09-16-2016, 06:42 PM
Post: #3
 Logan Member Posts: 129 Joined: Jul 2016
RE: (42s) Convert Decimal to Tape Measure Fractions
Thank you! Those definitely give me some ideas and defaulting to a 16th as the precision seems good enough for most purposes and that will trim things down a bit.

I was trying to avoid changing the display mode, though that would have simplified things I know.
09-16-2016, 07:03 PM
Post: #4
 Dieter Senior Member Posts: 2,398 Joined: Dec 2013
RE: (42s) Convert Decimal to Tape Measure Fractions
(09-16-2016 06:42 PM)Logan Wrote:  Thank you! Those definitely give me some ideas and defaulting to a 16th as the precision seems good enough for most purposes and that will trim things down a bit.

The linked program allows the user to set the precision he prefers. 1/8 is just as fine as 1/64. If possible (and set by the user) the program reduces the resulting fraction to the one with the least denominator.

(09-16-2016 06:42 PM)Logan Wrote:  I was trying to avoid changing the display mode, though that would have simplified things I know.

On the 41 (C/CV) there is no AIP command that appends the integer portion to Alpha. So ARCL has to be used and the display mode is set to FIX 4 without radix mark (flag 29). On the 42s you can of course use AIP (and a few stack exchange commands as AIP only works with X).

Maybe you have also seen the discussion on using RCL d/STO d on the 41. This synthetic 41 command saves all flag settings (not only those for the display) resp. restores them later.

Dieter
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)