[erlang-questions] How to find the full OTP release number (including patch level)?
Dominic Williams
xpdoka@REDACTED
Wed Jun 6 09:07:40 CEST 2007
Hi Bill,
> So is there any "canonical" way that erlangers condition code
> based on functionality that is in a specific patch level of a
> release?
>
> For example, spawn_monitor is available in R11B-4 but not in
> some earlier patch levels of R11B
I try to avoid explicitly testing for release numbers. If I must
support several releases, I try to find code that works for them
all.
In the case of spawn_monitor, I grant you that I would want to
make use of it if it were available, it being safer than doing
spawn and monitor in two steps. I would therefore call the
function inside a try, and fallback to separate spawn and monitor
if I catch an undef.
Best regards,
Dominic Williams
http://dominicwilliams.net
----
More information about the erlang-questions
mailing list