[Gambas-user] abs as external function

Jussi Lahtinen jussi.lahtinen at gmail.com
Sun Jun 10 21:59:19 CEST 2018


Gambas does the conversions for you, thus interger and long are just
subsets of float. In C that is completely different thing.
In other words, Gambas Abs does everything what int abs, long abs and float
abs combined does in C.


Jussi

On Sun, Jun 10, 2018 at 10:52 PM, Demosthenes Koptsis <
demosthenesk at gmail.com> wrote:

> just for compatibility of porting libc
>
> there are int abs, long abs, single abs, float abs
>
> Gambas abs is only for floats
>
> not great function but it gave us the bug to autocomplete system!
>
> On 06/10/2018 10:30 PM, Jussi Lahtinen wrote:
>
> Yes, but why bother? Gambas already has abs().
>
>
> Jussi
>
> On Sun, Jun 10, 2018 at 10:09 PM, Demosthenes Koptsis <
> demosthenesk at gmail.com> wrote:
>
>> is this correct?
>>
>> 'int abs (int number)
>> Public Extern {abs}(number As Integer) As Integer
>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180610/4cafa4f8/attachment.html>


More information about the User mailing list