Numbers within units (50g)
|
09-16-2015, 04:43 PM
Post: #4
|
|||
|
|||
RE: Numbers within units (50g)
Thank you both for checking this behavior on the 48's.
I guess number expressions could make sense for things like this: 3_m^(2+2) --> 3_m^4 but then, this is handled on the compiler, the unit object can't hold the 2+2 and therefore this is only useful if the user actually types (2+2) instead of 4. 1_m^s gives a syntax error, as a unit cannot be used as an exponent. So far so good. but in a symbolic: '1_m^s' it shows as '_(1,m^s)' in pretty print (back to '1_m^s' when decompiled for edit) when you would expect the constant 1_m raised to the identifier 's'. in sysRPL this decompiles as: SYMBOL Z1_ SYMBOL ID m ID s x^ ; xFORMUNIT ; Very strange and unexpected. Trying to EVAL this gives you an "inconsistent units" error. I couldn't find any reference to this in years of discussions here and in comp.sys.hp48. My question about the usefulness is to see if this is a behavior worth replicating in newRPL. My guess is not. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)