mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 06:50:43 +02:00
* made array a global to avoid stack overflow
This commit is contained in:
parent
ce2c8062bd
commit
6911a79687
@ -1,4 +1,5 @@
|
|||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
|
$Id$
|
||||||
|
|
||||||
Copyright (c) 1993,94 by Florian Kl„mpfl
|
Copyright (c) 1993,94 by Florian Kl„mpfl
|
||||||
Translated By Eric Molitor (emolitor@freenet.fsu.edu)
|
Translated By Eric Molitor (emolitor@freenet.fsu.edu)
|
||||||
@ -12,11 +13,12 @@ program eratosthenes;
|
|||||||
|
|
||||||
const
|
const
|
||||||
max = 1000000;
|
max = 1000000;
|
||||||
|
var
|
||||||
|
a : array[1..max] of boolean;
|
||||||
|
|
||||||
procedure eratos;
|
procedure eratos;
|
||||||
|
|
||||||
var
|
var
|
||||||
a : array[1..max] of boolean;
|
|
||||||
i,j : longint;
|
i,j : longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -37,3 +39,8 @@ program eratosthenes;
|
|||||||
write('Calculating the Prime Numbers from 1 to ',max,'...');
|
write('Calculating the Prime Numbers from 1 to ',max,'...');
|
||||||
eratos;
|
eratos;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
{ $Log$
|
||||||
|
{ Revision 1.2 1998-04-06 12:17:00 pierre
|
||||||
|
{ * made array a global to avoid stack overflow
|
||||||
|
{ }
|
Loading…
Reference in New Issue
Block a user