[erlang-questions] Defining type with chars.
Marcin Miszczyk
mpmiszczyk@REDACTED
Sun Oct 16 02:26:13 CEST 2016
By standard you mean encoding? Chars should handle both easily (
http://erlang.org/doc/reference_manual/data_types.html#id64690 in "Number"
section)
But even then $G is allowed both in code and shell, only type definition is
deficient. I'm just wondering if it's bug, oversight, or are there some
obvious reasons I'm just not seeing.
mr
On Sat, Oct 15, 2016 at 11:58 PM, Max Kuzmins <maxp72@REDACTED> wrote:
> Hi Marcin,
>
> There's a char() type available, that's defined as 0..16#10ffff. Perhaps
> you're not allowed to use $G syntax as it would be unclear what standard
> your character refers to.
>
> Regards,
> Max
>
> On 15 October 2016 at 21:49, Marcin Miszczyk <mpmiszczyk@REDACTED> wrote:
>
>> Hi.
>>
>> Does anyone know why
>> -type dna_nucleotide() :: $G | $C | $T | $A.
>> is not valid sytax, while
>> -type dna_nucleotide() :: 71 | 67 | 84 | 65.
>> of course is?
>>
>> mr
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161016/cf47b908/attachment.htm>
More information about the erlang-questions
mailing list