Post Reply 
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Numbers within units (50g) - Claudio L. - 09-15-2015, 09:53 PM
RE: Numbers within units (50g) - rprosperi - 09-16-2015, 12:55 AM
RE: Numbers within units (50g) - Bruno - 09-16-2015, 06:54 AM
RE: Numbers within units (50g) - Claudio L. - 09-16-2015 04:43 PM
RE: Numbers within units (50g) - rprosperi - 09-17-2015, 12:38 AM
RE: Numbers within units (50g) - Tugdual - 09-17-2015, 06:22 AM
RE: Numbers within units (50g) - Tugdual - 09-22-2015, 05:40 AM



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