Atkinson dither algorithm

Malte Pfaff-Brill revolution at derbrill.de
Sat Oct 7 09:53:44 EDT 2017


Hi Al,

I already posted on the forums, but for completeness also here:

a lot can be done by replacing repeat with with repeat for each where you can.

 --    repeat with i = 1 to the number of words of fldhexa3
   --       put 00 & word i of fldhexa3 & word i of fldhexa3 & word i of fldhexa3 after tVar2
   --    end repeat

   repeat for each word theWord in fldhexa3
      put 00 & theword & theword & theword after tVar2
   end repeat


A sidenode:

I always use strict compile mode, therefore I added the needed variable declarations and noticed you use startTime as a variablename, which is a reserved keyword. That is not a good idea.  (I noticed, because I managed to freeze liveCode where I fixed only half of the use of startTime. Booom.)

Cheers,

malte



More information about the use-livecode mailing list