Post Reply 
Can units and prefixes be improved
10-21-2015, 06:55 PM
Post: #1
Can units and prefixes be improved
I have a program that can do unit conversions thanks to suggestions in another thread.
It would be nice if unit prefixes (milli,etc.) could be used too.

Running my ZIPP program or Han's, when you are prompted for an input number, selecting Units Prefix n (for example) gives an exclamation mark. If you start typing in a number, it gives you n with an underscore almost like a unit, but the program doesn't combine that with the units and when you proceed to use it you get a syntax error.

I had hoped it would just insert *1E-9 or whatever into the number you were typing at run time. Am I missing something?
.
The workaround would seem to involve setting up your own nano variables and entering 1*nano when inputting a number.

Also some units generate an "inconsistent units" error - this can thankfully be trapped by IFERR, but should some unit groups be split up?

Finally, atomic constants are well represented, and you can select 1g for gravity (although HP call it grav) - but there are no earth radius, solar mass or lunar distance.

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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