Skip to content

Commit

Permalink
Corrected address generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
beNative committed Nov 3, 2015
1 parent 54aae66 commit 24dd249
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Libraries/DDuce/DDuce.RandomData.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ RandomData = record
{$ENDREGION}

{$REGION 'LastNames'}
LastNames: array [0 .. 765] of string = (
LastNames: array [0 .. 768] of string = (
'Adams',
'Adamski',
'Adkins',
Expand All @@ -1242,6 +1242,7 @@ RandomData = record
'Appleton',
'Arant',
'Arce',
'Armstrong',
'Arnold',
'Arreguin',
'Arterburn',
Expand Down Expand Up @@ -1360,6 +1361,7 @@ RandomData = record
'Cleveland',
'Cline',
'Clingman',
'Clinton',
'Cloud',
'Clyburn',
'Cobbins',
Expand Down Expand Up @@ -1830,6 +1832,7 @@ RandomData = record
'Romeo',
'Rondeau',
'Ross',
'Rossi',
'Roughton',
'Rouse',
'Royster',
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 24dd249

Please sign in to comment.