Here's another way:
{$APPTYPE CONSOLE}
uses
SysUtils, StrUtils;
const
Chars = 'abc123';
WordLen = 3;
var Word: String;
NumChars: Integer;
function NextWord( var Word: String): Boolean;
var I: Integer;
begin
Result := True;
for I := WordLen downto 1 do
begin
Word[ I] := Chars[ Pos( Word[ I], Chars) mod NumChars + 1];
if Word[ I] <> Chars[ 1] then
exit;
end;
Result := False;
end;
begin
NumChars := Length( Chars);
Word := DupeString( Chars[ 1], WordLen);
repeat
Writeln( Word)
until not NextWord( Word);
end.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
Theodoros Bebekis
Sent: Friday, November 16, 2007 2:19 PM
To: [email protected]
Subject: Re: [delphi-en] generator
O/H Rob Kennedy έγραψε:
>
>
> Arsen Khachatryan wrote:
> > my question is: generate the all possible variant of words and
> symbols, > but not clicking every time,just one time click and start
> to generate into > the txt file.
>
> That's not a question. That's a command, and I'm not inclined to obey.
lol
>
> > For example i have program which generate > 111111 > 111112 >
> 111113 > ......
> > 999999
> > now i want to generate like this but with letters and symbols like
> aaaaaa > aaaaab > aaaaac > aaaaa1 > aaaaa2 > so like this
>
> OK. So what's your question?
--
Regards
Theo
------------------------
Theo Bebekis
Thessaloniki, Greece
------------------------
Greek_Delphi_Prog : a Delphi Programming mailing list in Greek at
http://groups.yahoo.com/group/Greek_Delphi_Prog
CSharpDotNetGreek : A C# and .Net mailing list in Greek language at
http://groups.yahoo.com/group/CSharpDotNetGreek
atla_custom : a Unisoft Atlantis Customization mailing list at
http://groups.yahoo.com/group/atla_custom
------------------------
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/delphi-en/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/