Post Reply 
LAST on HP20S
07-07-2016, 05:00 PM
Post: #4
RE: LAST on HP20S
(07-07-2016 02:54 PM)jbhp55 Wrote:  Dear rprosperi,

that's what I thought it should do, and it sometimes does. However, if I type:
1
+
1
=
(result: 2)
LAST

then the result is not 2, but an older result. (in my case 36).

If I then start a new calculation:
1
+
LAST, the output is again 36, and not 2 (the manual says that the last result is available as soon as a new operation is started).

This behaviour may be intended, but to me it is not clear which number is stored in LAST. This is particularly problematic in programming.

It seems that = stores something in LAST, but not for immediate use. LAST itself stores its outcome in LAST, overwriting the last result after =. Functions like sin, cos, tan do not store their result in LAST.

I cannot discover the logic behind this behaviour.
Can you?

Best regards,

Jaap.

Though hard to articulate precisely (the manual isn't great either) LAST returns the value of the LAST result, before the current result.

Doing 1 [+] 1 [=] => 2

If you want to operate on this latest result, just treat it like the first item you would have typed in; for example, to triple the above result, continue by typing:

[*] 3 [=] => 6.

There is no need to use LAST here, since you can easily operate on the current result.

The trig functions also do save to last, as follows:

60 [SIN] => 0.87

2 [*] LAST = => 1.73

The simplest way to think of how it works, to me, is LAST is a way to get at the last result that is no longer directly available, which is exactly what it's purpose is.

If this doesn't help, please show some additional examples where LAST does not provide the expected result, for cases when you cannot operate on the most current result.

HTH

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
LAST on HP20S - jbhp55 - 07-07-2016, 12:59 PM
RE: LAST on HP20S - rprosperi - 07-07-2016, 01:34 PM
RE: LAST on HP20S - jbhp55 - 07-07-2016, 02:54 PM
RE: LAST on HP20S - rprosperi - 07-07-2016 05:00 PM
RE: LAST on HP20S - jbhp55 - 07-07-2016, 09:05 PM
RE: LAST on HP20S - Dave Frederickson - 07-07-2016, 10:55 PM
RE: LAST on HP20S - rprosperi - 07-07-2016, 11:23 PM
RE: LAST on HP20S - jbhp55 - 07-08-2016, 09:33 AM
RE: LAST on HP20S - rprosperi - 07-08-2016, 02:49 PM
RE: LAST on HP20S - jbhp55 - 07-08-2016, 10:14 AM
RE: LAST on HP20S - jbhp55 - 07-08-2016, 03:54 PM
RE: LAST on HP20S - rprosperi - 07-08-2016, 05:47 PM
RE: LAST on HP20S - jbhp55 - 07-08-2016, 07:18 PM
RE: LAST on HP20S - Dave Frederickson - 07-08-2016, 07:20 PM



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