[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two-liner; Circles



John_L._Graham@adbbs.antioch.edu wrote:

>The fun part of getting this was to fit in two lines was setting up a flag
>to toggle the color between black and white.
:
> F = F + 1:G = (F - 2 *  INT (F / 2)) * 3: HCOLOR= G

You're doing too much work.  You should have used:

 G = (G = 0) * 3

or even better:

 G = 3 * NOT G

Then you won't have to worry about F overflowing.

You can also use things like NEXT J,I and NEXT J,H rather than NEXT : NEXT.

And then there's always integer ("A%") variables.

Followups directed to comp.sys.apple2.programmer.

-- 
         _-<#)-=# http://cse.unl.edu/~gberigan/ (Greg Berigan)
     ___/___
  _-~_--<###)     $250,000 and two-year prison terms for using "obscene, lewd,
<~c>' __--<       lascivious, filthy, or indecent" language on the Internet in
 \_--=____#)      a manner intended to annoy or harass?  Watch those flames!