BBC BASIC for Windows
« The array value duplication protection tool »
Welcome Guest. Please Login or Register. Apr 5th, 2018, 10:53pm
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
The array value duplication protection tool
« Thread started on: Mar 29th, 2016, 03:12am »
Lets say you have an array and you want to make sure all your array information doesn't have duplicated values.
Well here is the tool that does just that. (Of course your array must match the array in the tool) Code:
DEF PROC_comparray(n)
cond$="cleared"
nex=1
FOR cou=1 TO n
FOR co=nex TO n
IF cou<>co THEN IF x%(cou)=x%(co) THEN cond$="duplicate"
NEXT co
nex=nex+1
NEXT cou
ENDPROC