• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended
HP 50g graphing calculator

Hi dear HP Community , 

Before i went to topic i hope that you'll safe and sound.

 

So here is my issue ,

I want to write a code which will able to detect duplicate values ( and show a message when value is detected as duplicate ( or multiple ) ) when repeatedly entering those values as INFORM input

Also i want to store all entered values in list and when  happens that some of entered values turns out to be duplicate ( or multiple ) I want to RE-ENTER that value , or these values if i have more of this  ,  and store it in place ( in list ) where that duplicate value was initially

 

So right above  is definition of my task , hope you understand what I'm asking. 

Also I'm referring to write this code for HP 50g graphing calculator and if possible in User RPL language.

 

Here is a code , "bug" code of what I done so far but unfortunately something is not wrong with my code.

source code of my attemptsource code of my attempt

 

Try this code on yourself !!

Problem with this code is in fact  when you entered multiple values , like as example 1, 1, 1 , 1 in INFORM input the value 

which is entered as second ( 2. nd )  will be recognized as duplicate but when you hit that number 1 at third ( 3.rd ) time  then value does not be recognized as duplicate. Again when you enter same number ( 1 ) ( or string but does not work on any string ) then you'll get a message which signalize a duplicate... so...  not so good algorithm.

 

Also my program does not works on any strings  and that is a bug too because i want to recognize duplicate in quite sort of data types including numbers , strings and global variable name NOT only numbers !!

 

Please help me with this i need this for my program !! 

Bye 🤗

 

Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.