Hi Sandeep, Is is possible to use 2 dimensional dynamic array ... http://stackoverflow.com/questions/162753/using-length-with-multi-dimensiona l-dynamic-arrays-in-delphi
You can have non-rectangular 2 dimensional dynamic array. However, I don't think you can have non-rectangular 2 dimension array constant so you may need to change the declaration to variable: var 2DStrArr: array of array of string; Cheers Rodney -----Original Message----- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]on Behalf Of delphi-requ...@delphi.org.nz Sent: Thursday, 10 December 2009 12:43 p.m. To: delphi@delphi.org.nz Subject: Delphi Digest, Vol 74, Issue 7 Send Delphi mailing list submissions to delphi@delphi.org.nz 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 delphi-requ...@delphi.org.nz You can reach the person managing the list at delphi-ow...@delphi.org.nz When replying, please edit your Subject line so it is more specific than "Re: Contents of Delphi digest..." Today's Topics: 1. Re: Make all possible unique combinations (Cameron Hart) 2. Re: Make all possible unique combinations (Sandeep Chandra) 3. Make all possible unique combinations (Rodney Chan) 4. Re: Make all possible unique combinations (Cameron Hart) 5. Re: Make all possible unique combinations (Sandeep Chandra) 6. Re: Make all possible unique combinations (ROHIT GUPTA) ---------------------------------------------------------------------- Message: 1 Date: Thu, 10 Dec 2009 12:20:02 +1300 From: "Cameron Hart" <cameron.h...@flowsoftware.co.nz> Subject: Re: [DUG] Make all possible unique combinations To: "NZ Borland Developers Group - Delphi List" <delphi@delphi.org.nz> Message-ID: <dbc5cca98a0ee4459c8be38bf3028f123be...@flowserver.flow.net.nz> Content-Type: text/plain; charset="US-ASCII" 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.h...@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-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Sandeep Chandra Sent: Thursday, 10 December 2009 11:47 a.m. To: delphi@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@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ------------------------------ Message: 2 Date: Wed, 9 Dec 2009 15:28:04 -0800 (PST) From: Sandeep Chandra <sandeep_gro...@yahoo.com> Subject: Re: [DUG] Make all possible unique combinations To: NZ Borland Developers Group - Delphi List <delphi@delphi.org.nz> Message-ID: <526609.33112...@web30905.mail.mud.yahoo.com> Content-Type: text/plain; charset=utf-8 I don't remember changing my name to Sandra from Sandeep! ----- Original Message ---- From: Cameron Hart <cameron.h...@flowsoftware.co.nz> To: NZ Borland Developers Group - Delphi List <delphi@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.h...@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-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Sandeep Chandra Sent: Thursday, 10 December 2009 11:47 a.m. To: delphi@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@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ------------------------------ Message: 3 Date: Thu, 10 Dec 2009 12:28:52 +1300 From: Rodney Chan <rc...@compuspec.com> Subject: [DUG] Make all possible unique combinations To: delphi@delphi.org.nz Message-ID: <000801ca7927$5ed47db0$ed000...@dcspec12> Content-Type: text/plain; charset=us-ascii Is it OK to use for low(ArrayName) to high(ArrayName) do ... Rodney -----Original Message----- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]on Behalf Of delphi-requ...@delphi.org.nz Sent: Thursday, 10 December 2009 12:12 p.m. To: delphi@delphi.org.nz Subject: Delphi Digest, Vol 74, Issue 6 Send Delphi mailing list submissions to delphi@delphi.org.nz 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 delphi-requ...@delphi.org.nz You can reach the person managing the list at delphi-ow...@delphi.org.nz 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 <sandeep_gro...@yahoo.com> Subject: [DUG] Make all possible unique combinations To: delphi@delphi.org.nz Message-ID: <729593.59672...@web30901.mail.mud.yahoo.com> 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 Delphi@delphi.org.nz http://listserver.123.net.nz/mailman/listinfo/delphi End of Delphi Digest, Vol 74, Issue 6 ************************************* ------------------------------ Message: 4 Date: Thu, 10 Dec 2009 12:36:36 +1300 From: "Cameron Hart" <cameron.h...@flowsoftware.co.nz> Subject: Re: [DUG] Make all possible unique combinations To: "NZ Borland Developers Group - Delphi List" <delphi@delphi.org.nz> Message-ID: <dbc5cca98a0ee4459c8be38bf3028f123be...@flowserver.flow.net.nz> Content-Type: text/plain; charset="US-ASCII" I was just optimizing your name S[andeep Ch]andra. I can do the same with your algorithm when you send it through. Cameron Hart | Development Manager | Flow Software Limited P: +64 9 476 3579 | M: +64 21 222 3569 | E: cameron.h...@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-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Sandeep Chandra Sent: Thursday, 10 December 2009 12:28 p.m. To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] Make all possible unique combinations I don't remember changing my name to Sandra from Sandeep! ----- Original Message ---- From: Cameron Hart <cameron.h...@flowsoftware.co.nz> To: NZ Borland Developers Group - Delphi List <delphi@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.h...@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-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Sandeep Chandra Sent: Thursday, 10 December 2009 11:47 a.m. To: delphi@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@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ------------------------------ Message: 5 Date: Wed, 9 Dec 2009 15:38:17 -0800 (PST) From: Sandeep Chandra <sandeep_gro...@yahoo.com> Subject: Re: [DUG] Make all possible unique combinations To: rc...@compuspec.com, NZ Borland Developers Group - Delphi List <delphi@delphi.org.nz> Message-ID: <684297.31210...@web30906.mail.mud.yahoo.com> Content-Type: text/plain; charset=utf-8 Sorry, I can't use for as the number of arrays can change. Sandeep ----- Original Message ---- From: Rodney Chan <rc...@compuspec.com> To: delphi@delphi.org.nz 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: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]on Behalf Of delphi-requ...@delphi.org.nz Sent: Thursday, 10 December 2009 12:12 p.m. To: delphi@delphi.org.nz Subject: Delphi Digest, Vol 74, Issue 6 Send Delphi mailing list submissions to delphi@delphi.org.nz 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 delphi-requ...@delphi.org.nz You can reach the person managing the list at delphi-ow...@delphi.org.nz 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 <sandeep_gro...@yahoo.com> Subject: [DUG] Make all possible unique combinations To: delphi@delphi.org.nz Message-ID: <729593.59672...@web30901.mail.mud.yahoo.com> 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 Delphi@delphi.org.nz http://listserver.123.net.nz/mailman/listinfo/delphi End of Delphi Digest, Vol 74, Issue 6 ************************************* _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ------------------------------ Message: 6 Date: Wed, 9 Dec 2009 15:41:52 -0800 (PST) From: ROHIT GUPTA <r.gu...@xtra.co.nz> Subject: Re: [DUG] Make all possible unique combinations To: NZ Borland Developers Group - Delphi List <delphi@delphi.org.nz> Message-ID: <368947.74026...@web96111.mail.aue.yahoo.com> Content-Type: text/plain; charset="iso-8859-1" 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_gro...@yahoo.com> wrote: From: Sandeep Chandra <sandeep_gro...@yahoo.com> Subject: Re: [DUG] Make all possible unique combinations To: "NZ Borland Developers Group - Delphi List" <delphi@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.h...@flowsoftware.co.nz> To: NZ Borland Developers Group - Delphi List <delphi@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.h...@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-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Sandeep Chandra Sent: Thursday, 10 December 2009 11:47 a.m. To: delphi@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@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ? ? ? _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@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.html ------------------------------ _______________________________________________ Delphi mailing list Delphi@delphi.org.nz http://listserver.123.net.nz/mailman/listinfo/delphi End of Delphi Digest, Vol 74, Issue 7 ************************************* _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe