Browse Source

* made array a global to avoid stack overflow

pierre 27 years ago
parent
commit
6911a79687
1 changed files with 8 additions and 1 deletions
  1. 8 1
      install/demo/eratos.pp

+ 8 - 1
install/demo/eratos.pp

@@ -1,4 +1,5 @@
 {****************************************************************************
+  $Id$
 
                    Copyright (c) 1993,94 by Florian Kl„mpfl
                    Translated By Eric Molitor ([email protected])
@@ -12,11 +13,12 @@ program eratosthenes;
 
   const
      max = 1000000;
+  var
+     a : array[1..max] of boolean;
 
   procedure eratos;
 
     var
-       a : array[1..max] of boolean;
        i,j : longint;
 
     begin
@@ -37,3 +39,8 @@ program eratosthenes;
      write('Calculating the Prime Numbers from 1 to ',max,'...');
      eratos;
   end.
+
+{ $Log$
+{ Revision 1.2  1998-04-06 12:17:00  pierre
+{   * made array a global to avoid stack overflow
+{ }