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.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: The array value duplication protection tool  (Read 333 times)
michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 335
thumbup 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
 


And here is a program that uses this tool:

http://bb4w.conforums.com/index.cgi?board=support&action=display&num=1459164347
« Last Edit: Mar 29th, 2016, 05:38am by michael » User IP Logged

I like making program generators and like reinventing the wheel
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls