[erlang-questions] Type and Opaque - Defining size for a type

Ken Robinson kenrobinsonster@REDACTED
Tue Apr 12 15:12:56 CEST 2011


Ah ha.
I see it now in the doco

Integer :: integer()
         | Erlang_Integer                 %% ..., -1, 0, 1, ... 42 ...
         | Erlang_Integer..Erlang_Integer %% specifies an integer range

many thanks.
Ken.

On Tue, Apr 12, 2011 at 8:16 PM, Anthony Ramine <nox@REDACTED> wrote:
> -opaque u16int() :: 1..(1 bsl 16 - 1).
>
> Le 12 avr. 2011 à 06:24, Ken Robinson a écrit :
>
>> Hi All,
>> I was wondering if one can define a type to be a certain size, say an
>> integer() to be an unsigned byte (16 bits).
>>
>> This is all I have
>> -opaque u16int():: bitstring()
>> -export_type([u16int/0]).
>>
>> Any help would be greatly appreciated.
>>
>> --
>> regards,
>> Ken Robinson
>> Mob +61438681120
>> Home +61738523767
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>
> --
> Anthony Ramine
> Dev:Extend
> http://dev-extend.eu
>
>
>
>
>



-- 
regards,
Ken Robinson
Mob +61438681120
Home +61738523767



More information about the erlang-questions mailing list