Removing tag after units conversion
|
04-06-2015, 07:02 PM
Post: #1
|
|||
|
|||
Removing tag after units conversion
Does anyone know if there is a way to remove the units tag at the end of the number after converting from one unit to another. Example: 4.1244_in to 4.1244. I know I
can simply pull the number from the stack and edit out the tag, but I was hoping there might be a quicker, more convenient way of doing this. |
|||
04-06-2015, 07:49 PM
Post: #2
|
|||
|
|||
RE: Removing tag after units conversion
You could just divide by one unit:
12_in/1_in ==> 12 |
|||
04-06-2015, 10:21 PM
Post: #3
|
|||
|
|||
RE: Removing tag after units conversion | |||
04-07-2015, 02:14 AM
Post: #4
|
|||
|
|||
RE: Removing tag after units conversion
(04-06-2015 07:49 PM)DrD Wrote: You could just divide by one unit: CAS.left(unit) is more cryptic but it also works, e.g. CAS.left(12_in) returns 12. One benefit of this method is that you don't need to know the unit; it strips off ANY unit or combination of units. <0|ΙΈ|0> -Joe- |
|||
04-07-2015, 09:10 PM
Post: #5
|
|||
|
|||
RE: Removing tag after units conversion
(04-07-2015 02:14 AM)Joe Horn Wrote:Good solution Joe. I used the CAS method in my DTAG function for removing the units tag from the numerical result of a conversion on the 1st level stack.(04-06-2015 07:49 PM)DrD Wrote: You could just divide by one unit: |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)