HP Forums

Full Version: Z LST: List handling API
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A few list handling routines
Version 0.001


 // List routines V0.001 StephenG1CMZ 2017


 // BOOL:"0 OR 1" IF element duplicated in LST
 // OR POSITION OF 1st duplicate (slower)
  LOCAL II:=1;

 //RETURN 1 if LST Has Duplicates ELSE 0
  RETURN LST_HasDups(LST,1);


 //Return LST with duplicates occuring once. Input unchanged.


 //As LST_Once: Using CAS. 
  LOCAL st;

  st:=SL+" union "+SL;

 //RETURN position of 1st Duplicate ELSE 0
 //If you do not need position: IZ_HasDups returns 01
  RETURN LST_HasDups(LST,0);

  LOCAL LST:=IP(RANDOM(1000,1,1ᴇ8));
  MSGBOX(NN+" in "+(TICKS-TM));
For whatever reason, the missing procedure now shows up in the run list, both on the current compiler and 8151.

I have created a new more comprehensive list API, without using this file in case it contained a rogue character...this thread is now deprecated and may be deleted in due course.
Reference URL's