mirror of
https://github.com/irmen/prog8.git
synced 2026-04-22 08:16:49 +00:00
fix pointer test
This commit is contained in:
@@ -13,18 +13,18 @@ main {
|
||||
uword prime
|
||||
uword k
|
||||
const uword SIZEPL = 8191
|
||||
uword @zp flags_ptr = memory("flags", SIZEPL, $100)
|
||||
^^bool @zp flags_ptr = memory("flags", SIZEPL, $100)
|
||||
|
||||
txt.print("calculating...\n")
|
||||
|
||||
sys.memset(flags_ptr, SIZEPL, 1)
|
||||
count = 1
|
||||
for i in 0 to SIZEPL-1 {
|
||||
if flags_ptr[i]!=0 {
|
||||
if flags_ptr[i] {
|
||||
prime = i + i + 3
|
||||
k = i + prime
|
||||
while k <= SIZEPL-1 {
|
||||
flags_ptr[k] = 0 ; false
|
||||
flags_ptr[k] = false
|
||||
k += prime
|
||||
}
|
||||
; txt.print_uw(prime)
|
||||
|
||||
Reference in New Issue
Block a user