Hi Bruno,
> I'm studying lib/sumul.l, specifically the 'grid function. I understand how
> it works now, but I have two doubts:
>
> 1) why are symbols in the grid interned?
> ...
> (if (> DX 26)
> (box)
> (intern (pack (char (+ X 96)) Y)) ) ) # why
It is just to conveniently access them by name (e.g. a1 - z1), in programs and
during debugging. For example in "games/chess.l":
(bookMove 'd2 'd4)
or
$ pil games/chess.l -main +
...
: (go d2 d4)
...
-> ("BlackPawn" d7 . d5)
: (show 'd4)
d4 ((c4 . e4) d3 . d5)
piece "WhitePawn"
x 4
whAtt ("WhiteQueen")
color
y 4
-> d4
> 2) what does the F in FX and FY stand for?
> ...
> (de grid (DX DY FX FY)
> ...
> (let West (and FX (last Grid))
It stands for "Flag", as these parameters are boolean values.
☺/ A!ex
--
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe