Sieve of Eratosthenes: Difference between revisions

m
→‎{{header|Free Pascal}}: to avoid error when list of primes is empty
m (→‎{{header|Free Pascal}}: to avoid error when list of primes is empty)
Line 8,256:
I: DWord;
begin
for I := 0 toif aList.Size -<> 0 2then dobegin
Write(if aList[I],.Size > ',1 ');then
WriteLn(aList[ for I := 0 to aList.Size - 1]);2 do
Write(aList[I], ', ');
WriteLn(aList[aList.Size - 1]);
end;
aList.Free;
end;
Line 8,397 ⟶ 8,400:
for I := 0 to Length(aList) - 2 do
Write(aList[I], ', ');
WriteLn(if aList[High(aList)]); <> nil then
WriteLn(aList[High(aList)]);
end;
begin
73

edits