From 24dd2490e047a37e2b90257e97e60f89aecc162a Mon Sep 17 00:00:00 2001 From: Tim Sinaeve Date: Tue, 3 Nov 2015 12:45:56 +0100 Subject: [PATCH] Corrected address generation. --- Libraries/DDuce/DDuce.RandomData.pas | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Libraries/DDuce/DDuce.RandomData.pas b/Libraries/DDuce/DDuce.RandomData.pas index 8305da61..0bcb9613 100644 --- a/Libraries/DDuce/DDuce.RandomData.pas +++ b/Libraries/DDuce/DDuce.RandomData.pas @@ -1224,7 +1224,7 @@ RandomData = record {$ENDREGION} {$REGION 'LastNames'} - LastNames: array [0 .. 765] of string = ( + LastNames: array [0 .. 768] of string = ( 'Adams', 'Adamski', 'Adkins', @@ -1242,6 +1242,7 @@ RandomData = record 'Appleton', 'Arant', 'Arce', + 'Armstrong', 'Arnold', 'Arreguin', 'Arterburn', @@ -1360,6 +1361,7 @@ RandomData = record 'Cleveland', 'Cline', 'Clingman', + 'Clinton', 'Cloud', 'Clyburn', 'Cobbins', @@ -1830,6 +1832,7 @@ RandomData = record 'Romeo', 'Rondeau', 'Ross', + 'Rossi', 'Roughton', 'Rouse', 'Royster', @@ -2891,7 +2894,7 @@ class function RandomData.Street: string; Result := EmptyStr; Result := Result + Str(StreetBeginnings) + Str(StreetEndings) + ' ' + Str - (StreetTypes) + ' ' + IntToStr((Random(499) + 1) div (Random(9) + 1) + 1); + (StreetTypes); end; class function RandomData.BirthDate(AMinYear, AMaxYear: Word): TDate; @@ -2911,7 +2914,12 @@ class function RandomData.City: string; class function RandomData.Address: string; begin - Result := Format('%s %d %d %s', [Street, Number(200), Number(50000), City]); + Result := Format('%d, %s %s, %d', [ + ((Random(499) + 1) div (Random(9) + 1) + 1), + Street, + City, + Number(50000) + ]); end; class function RandomData.Adjective: string;