[m-users.] uint32 FFI problem
Peter Wang
novalazy at gmail.com
Sun Jul 7 11:53:59 AEST 2019
On Sat, 6 Jul 2019 21:05:26 +0100, emacstheviking <objitsu at gmail.com> wrote:
>
> But when I do thois the compiler is angry with me: :(
>
> sdl2.m:067: In clause for predicate `main'/2:
> sdl2.m:067: in argument 1 of call to predicate `sdl2.sdl_delay'/3:
> sdl2.m:067: type error: argument has type `int',
> sdl2.m:067: expected type was `uint32'.
Presumably you called sdl_delay like this:
sdl_delay(100, !IO)
instead of
sdl_delay(100u32, !IO)
Integer literals without any suffix have type 'int'.
Mercury does not feature any implicit type conversions.
Peter
More information about the users
mailing list