[erlang-questions] Guards syntax for multiple values
Fred Hebert
mononcqc@REDACTED
Wed Mar 27 03:45:06 CET 2019
On 03/26, Fred Hebert wrote:
>
>char_unreserved(Char) ->
> (Char >= ?0 andalso Char =< ?9 andalso
> Char >= ?A andalso Char =< ?Z andalso
> Char >= ?a andalso Char =< ?z andalso
> lists:member(Char, "~_-."))
> orelse
> (Char >= 0 andalso Char =< 16#10FFFF).
>
The last one should read 'not (Char >= 0 andalso Char =< 16#10FFFF)'
>
>char_reserved(Char) ->
> lists:member(Char, ":/?#[]@!$&\'()*+,;=")
> orelse
> (Char >= 0 andalso Char <= 16#10FFFF).
>
And similarly here, 'not (Char >= 0 andalso Char <= 16#10FFFF)'
My bad.
More information about the erlang-questions
mailing list