Post Reply 
HP49-HP50 : when {list of repeated solutions} —> {list with no rep. sol}
12-22-2022, 05:02 PM (This post was last modified: 12-22-2022 05:16 PM by Gil.)
Post: #9
RE: HP49-HP50 : when {list of repeated solutions} —> {list with no rep. sol}
Sorry, I checked in my HP manual:

\<<
SORT
DUP
1.
\<< DUP2 SAME DROPN \>>
DOSUBS
\>>

I understand that the 1 is because I want to
compare 1 element at a time with another one —> OK.

DOSUBS command is used normally for 1 previously string (obtained by the DUP).

Then you write DUP2 to establish the comparison. I know that we have to compare one element down with the other ones of a list. But, from your program, I understand — wrongly — that we do compare one single element but with the entire list obtained by SORT command.

In fact, which elements of which lists are compared?

It's clear that 2 lists are used, but how do we know it (from your program) that we take just one element even in the first list?

As I finally understood, if we have
{"1“, “2“, “3“}, you SORT and DUP each separate element from SORT with the ones in DUP and you eliminate the repeated elements from DUP. Correct?

Sorry for this elementary question and thanks for your kind comprehension.

Regards,
Gil
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP49-HP50 : when {list of repeated solutions} —> {list with no rep. sol} - Gil - 12-22-2022 05:02 PM



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