Ulam spiral (for primes): Difference between revisions
Content added Content deleted
Line 3,398: | Line 3,398: | ||
(*) |
(*) |
||
Free Pascal Compiler version 3.2.0 [2020/06/14] for x86_64 |
Free Pascal Compiler version 3.2.0 [2020/06/14] for x86_64 |
||
The free and readable alternative at C/C++ speeds |
The free and readable alternative at C/C++ speeds |
||
compiles natively to almost any platform, including raspberry PI * |
compiles natively to almost any platform, including raspberry PI * |
||
(*) |
(*) |
||
Line 3,408: | Line 3,408: | ||
CONST |
CONST |
||
(*) |
(*) |
||
Only odd numbers work |
Only odd numbers work |
||
(*) |
(*) |
||
SIZE = 9 ; |
SIZE = 9 ; |
||
MSIZE = SIZE * ord ( Odd ( SIZE ) ) ; |
MSIZE = SIZE * ord ( Odd ( SIZE ) ) ; |
||
Line 3,472: | Line 3,472: | ||
VAR |
VAR |
||
cnt: integer = 1 ; |
cnt: integer = 1 ; |
||
Turn_cnt: integer = 0 ; |
Turn_cnt: integer = 0 ; |
||
x: integer = MSIZE div 2 ; |
x: integer = MSIZE div 2 ; |
||
y: integer = MSIZE div 2 ; |
y: integer = MSIZE div 2 ; |