Day of the week: Difference between revisions

m
Line 685:
<b>Works with:</b> [https://en.wikipedia.org/wiki/Sinclair_QL ''Sinclair QL''] <br>
...having a structured [https://en.wikipedia.org/wiki/SuperBASIC ''BASIC''] with MOD and quite unlike the ZX81's "zeroeth-generation" BASIC that's rather like using a calculator which also is without an integer type. Even so, one should still put forth the effort into optimising the code for the task at hand, as done below - which if implemented for the ZX81's routine would make it finish in a fraction of a second, even in SLOW mode, as multiplying by 13 with a division by 5 is slower than by 256 alone, as well as that two divisions by multiples of 100 are much slower than one by 16 as used in [gopher://sdf.org/0/users/retroburrowers/TemporalRetrology/cc/os ''Lachman's method''] of calculating the day of the week.
N.B. this routine is not Y10K-compliant by relying on strings to have 4-digit years
 
<lang basic>
AUTO 100,10
Line 704:
END DEFine
 
{{keypress|ctrl|+space}}
</lang>
{{out}}