Fixed sieve example code - was out of date

This commit is contained in:
Bobbi Webber-Manners 2018-05-11 21:05:28 -04:00 committed by GitHub
parent 964032ae28
commit 43d45a06dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1151,7 +1151,12 @@ Here is the well-known Sieve of Eratosthenes algorithm for finding prime numbers
' Sieve of Eratosthenes
const sz=20
byte A[sz*sz] = 1
byte A[sz*sz] = {}
word i=0
pr.msg "Initializing array ..."; pr.nl
for i=0:sz-1
A[i]=1
endfor
call doall(sz, A)
end