Porting a raylib example to GNU Algol 68
Jose E. Marchesi
jemarch@gnu.org
Wed Jun 3 23:21:39 GMT 2026
> Hi Mohammad.
>
> I just tried the demo. It works like a charm :)
>
>> int k_mouse_button_left = 0;
>> Color k_raywhite = (SHORTEN SHORTEN -11 {245},
>> SHORTEN SHORTEN -11 {245},
>> SHORTEN SHORTEN -11 {245},
>> SHORTEN SHORTEN -1 {255}),
>> k_gray = (SHORTEN SHORTEN -126 {130},
>> SHORTEN SHORTEN -126 {130},
>> SHORTEN SHORTEN -126 {130},
>> SHORTEN SHORTEN -1 {255}),
>> k_blue = (SHORTEN SHORTEN 0,
>> SHORTEN SHORTEN 121,
>> SHORTEN SHORTEN -15 {241},
>> SHORTEN SHORTEN -1 {255}),
>> k_red = (SHORTEN SHORTEN -26 {230},
>> SHORTEN SHORTEN 41,
>> SHORTEN SHORTEN 55,
>> SHORTEN SHORTEN -1 {255});
>
> It seems to me, we may want to introduce an extension to allow a radix
> 10 for bits denotations, so in this sort of situation we could do:
>
> Color k_raywhite = (short short 10r245,
> short short 10r245,
> short short 10r245,
> short short 10r255)
Also, half-serious, I think it would be fun to get a bit lispy and
accept:
short, shoort, shooort, ...
long, loong, looong, loooong, ...
in int and bits denotations, so:
Color k_raywhite = (shoort 10r245,
shoort 10r245,
shoort 10r245,
shoort 10r255)
and same for mode declarers:
mode Color = struct (shoort bits r,g,b,a)
More information about the Algol68
mailing list