[Gambas-user] external functions and struct

Demosthenes Koptsis demosthenesk at gmail.com
Thu Jun 14 12:38:53 CEST 2018


ok it works without Struct as keyword at return value

Public Struct Mallinfo
   arena As Integer
   ordblks As Integer
   smblks As Integer
   hblks As Integer
   hblkhd As Integer
   usmblks As Integer
   fsmblks As Integer
   uordblks As Integer
   fordblks As Integer
   keepcost As Integer
End Struct

'struct mallinfo mallinfo (void)
Public Extern mallinfo() As Mallinfo


On 06/14/2018 11:55 AM, Benoît Minisini wrote:
> Le 14/06/2018 à 10:49, Demosthenes Koptsis a écrit :
>> i get an error with the following any help?
>>
>> Public Struct Mallinfo
>>    arena As Integer
>>    ordblks As Integer
>>    smblks As Integer
>>    hblks As Integer
>>    hblkhd As Integer
>>    usmblks As Integer
>>    fsmblks As Integer
>>    uordblks As Integer
>>    fordblks As Integer
>>    keepcost As Integer
>> End Struct
>>
>> 'struct mallinfo mallinfo (void)
>> Public Extern mallinfo() As Struct Mallinfo
>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
> Have you read http://gambaswiki.org/wiki/doc/extern ?
>
> Do you know C ?
>



More information about the User mailing list