[Issue 4164] sieve Sample D Program -- need documentation for array representation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 14 20:38:22 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4164


Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy at yahoo.com
            Summary|sieve Sample D Program      |sieve Sample D Program --
                   |                            |need documentation for
                   |                            |array representation


--- Comment #2 from Steven Schveighoffer <schveiguy at yahoo.com> 2010-05-14 20:38:19 PDT ---
The issue is there is no documentation.  The array actually represents the
values 3 to 16383 inclusive, with a stride of 2.

i.e. index 0 represents the number 3, index 1 represents the number 5.  This
relationship can be seen in the prime = i + i + 3 line.

With that in mind, the code is correct, it's just confusing :)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list