Sorry, I can't use for as the number of arrays can change.

Sandeep



----- Original Message ----
From: Rodney Chan <[email protected]>
To: [email protected]
Sent: Thu, 10 December, 2009 12:28:52 PM
Subject: [DUG]  Make all possible unique combinations

Is it OK to use

for low(ArrayName) to high(ArrayName) do
...

Rodney



-----Original Message-----
From: [email protected]
[mailto:[email protected]]on Behalf Of
[email protected]
Sent: Thursday, 10 December 2009 12:12 p.m.
To: [email protected]
Subject: Delphi Digest, Vol 74, Issue 6


Send Delphi mailing list submissions to
    [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
    http://listserver.123.net.nz/mailman/listinfo/delphi
or, via email, send a message with subject or body 'help' to
    [email protected]

You can reach the person managing the list at
    [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Delphi digest..."


Today's Topics:

   1. Make all possible unique combinations (Sandeep Chandra)


----------------------------------------------------------------------

Message: 1
Date: Wed, 9 Dec 2009 14:47:10 -0800 (PST)
From: Sandeep Chandra <[email protected]>
Subject: [DUG] Make all possible unique combinations
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

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






------------------------------

_______________________________________________
Delphi mailing list
[email protected]
http://listserver.123.net.nz/mailman/listinfo/delphi

End of Delphi Digest, Vol 74, Issue 6
*************************************

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



      

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

Reply via email to