A question about prio, op and aleph-null
Jose E. Marchesi
jemarch@gnu.org
Fri Feb 13 07:17:38 GMT 2026
Hi Chris.
> Good evening everyone,
>
> In van Vliet I see this sort of construct:
>
> prio {ℵ₀} MIN = 9;
> op MIN = (int a, b) int: (a < b | a | b);
>
> I interpret this as operator MIN is aleph-null ie not exported by the
> module in which it is declared.
>
> So in theory this would have the same outcome as
>
> prio MIN = 9;
> op {ℵ₀} MIN = (int a, b) int: (a < b | a | b);
>
> Or for that matter
>
> op {ℵ₀} MIN = (int a, b) int: (a < b | a | b);
> prio MIN = 9;
>
> which is probably the way I would code it (prio after declaration).
>
> But I'm wondering if I'm missing something? I poked around in the RR but
> couldn't find anything similar.
I think that van Vliet was assuming that by making the priority a secret
you would be also making it impossible to use the operator. MIN and MAX
are not standard operators.
The modules system, which AFAIK was described after van Vliet's work,
and that was never implemented until now anyway, does allow for a module
to publicize an operator and not its priority.
So I think the above definitions translate into:
prio MIN = 9;
op MIN = (int a, b) int: (a < b | a | b);
i.e. no pubs.
More information about the Algol68
mailing list