|
![](/i/fill.gif) |
"Mathuin" <mat### [at] gmail com> wrote:
> Mike Williams <nos### [at] econym demon co uk> wrote:
> \> The syntax inside functions is different from that of the main SDL. It
> > doesn't have "?" but it does have "select".
>
> I ended up making a macro instead of a function.
>
> 'white_stone' is 'stone(1, 1, 1)' and 'black_stone' is 'stone(0, 0, 0)' so I
> have this which works:
>
> #macro ScoreStone(i)
> stone(i ? 1 : 0, i ? 1 : 0, i ? 1 : 0)
> #end // macro ScoreStone(i)
I have since changed this to:
#macro ScoreStone(i)
stone(i, i, i)
#end // macro ScoreStone(i)
as i is either 0 or 1. Whee. Thank you again. :-P :-)
>
> It's kinda ugly, but it definitely works.
>
> Thank you for the pointer to select() -- I will use that in the future.
>
> >
> > --
> > Mike Williams
> > Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |