[DUG] Make all possible unique combinations

ROHIT GUPTA r.gupta at xtra.co.nz
Thu Dec 10 12:41:52 NZDT 2009


Bet you dont remember the sex change operation either  :-)

 Your problem however, needs more information.  If all you are doing is generating the string but not changing it, then a function with two arguments will do it.  If you are talking about storage then its another story

--- On Thu, 10/12/09, Sandeep Chandra <sandeep_groups at yahoo.com> wrote:

From: Sandeep Chandra <sandeep_groups at yahoo.com>
Subject: Re: [DUG] Make all possible unique combinations
To: "NZ Borland Developers Group - Delphi List" <delphi at delphi.org.nz>
Date: Thursday, 10 December, 2009, 12:28 PM

I don't remember changing my name to Sandra from Sandeep!



----- Original Message ----
From: Cameron Hart <Cameron.Hart at flowsoftware.co.nz>
To: NZ Borland Developers Group - Delphi List <delphi at delphi.org.nz>
Sent: Thu, 10 December, 2009 12:20:02 PM
Subject: Re: [DUG] Make all possible unique combinations

Hi Sandra

Perhaps if you share your existing algorithm we can help you faster.

Cameron Hart | Development Manager | Flow Software Limited
P: +64 9 476 3579 | M: +64 21 222 3569 | E:
cameron.hart at flowsoftware.co.nz
PO Box 305-237, Triton Plaza, Auckland 0757, New Zealand |
www.flowsoftware.co.nz

This message is intended for the addressee named above. It may contain
privileged or confidential information. If you are not the intended
recipient of this message you must not use, copy, distribute or disclose
it to anyone.

Please consider the environment before printing this email 

-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
On Behalf Of Sandeep Chandra
Sent: Thursday, 10 December 2009 11:47 a.m.
To: delphi at delphi.org.nz
Subject: [DUG] Make all possible unique combinations

I am looking for ideas to generate all possible combinations for the
following arrays. I don't want to use for.. loops as number of arrays
can change.

const
  STGR : array[1..2] of string = ('A1', 'A2');
  STG1 : array[1..4] of string = ('B1', 'B2', 'B3', 'B4');
  STG2 : array[1..2] of string = ('C1', 'C2');
  .
  .
  STGN : array[1..2] of string = ('N1', 'N2');


I have an algorithm to this but was wondering if there are other
simpler/better/quicker ways to do this.

Regards

Sandeep


      

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
unsubscribe

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe



      

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20091209/cf9ce45a/attachment-0001.html 


More information about the Delphi mailing list