[Gambas-user] A "Callback" function doesn't work.

Benoît Minisini gambas at ...1...
Thu Jul 18 17:34:39 CEST 2013


Le 18/07/2013 17:32, Jussi Lahtinen a écrit :
>> Uhmm... in ufficiale Jack documention I read:
>>
>> *****
>> typedef enum JackStatus jack_status_t
>> Status word returned from several JACK operations, formed by OR-ing
>> together the relevant JackStatus bits.
>> *****
>>
>> and more:
>>
>> ********
>> enum JackStatus
>>
>> jack_status_t bits
>> ********
>>
>> ...that:   BITS    What'ld it could be ?
>>
>
>
> I think Benoit is right about Integer.
> http://en.wikipedia.org/wiki/Word_%28computer_architecture%29
>
> In MS way (the wrong way) it was; word (16bit), dword (32bit) and qword
> (64bit).
>
>
> Bits refers to the fact that status constants are presented by single bit.
>
> Example (these are byte constants):
> Constant A = 1, and in binary 00000001
> Constant B = 2, and in binary 00000010
> Constant C = 4, and in binary 00000100
> Constant D = 8, and in binary 00001000
>
> etc.
>
> So, one byte size variable can present eight statuses at same time.
> Example, if variable x has status A and C, it has value 5 = 00000101, etc.
>
>
> Jussi

Yep. To use external functions, you must know how C code is translated 
by the compiler. And an 'enum' is translated to an 'int', which is an 
Integer in Gambas.

-- 
Benoît Minisini




More information about the User mailing list