<div dir="ltr">In my sdl2.m module I have this code<div><br></div><div><font face="courier new, monospace"><b>    % SDL_Rect<br>:- type sdl_rect.<br>:- pragma foreign_type("C", sdl_rect, "SDL_Rect", [can_pass_as_mercury_type]).</b></font><div><br></div><div>The SDL_Rect structure is perfect enough and I don't want to define something like:</div><div><br></div><div><font face="courier new, monospace"><b>:- type sdl_rect ---> sdl_rect(x::int, y::int, w::int, h::int).</b></font></div><div><br></div><div>all over the place. The compiler seems to be happy with the fact that when I type "sdl_rect" I will get "SDL_Rect" but in my test module I just can't figure out how to create an instance of it to actually pass atound!</div><div><b><br></b></div><div><font face="courier new, monospace"><b>  sdl_renderfillrect(Rnd, sdl_rect(0, 50, 200, 100), !IO),</b><br></font></div><div><div style="color:rgb(0,0,0);font-size:13.2px;line-height:17px;white-space:pre"><div><br></div></div></div><div>So...given I have declared an abstract type "sdl_rect" which is SDL_Rect under the hood....I can't believe I am even asking this as I have a horrible feeling the answer is so obvious......whataver....better to ask!</div></div><div><br></div><div>Thanks.</div><div><br></div><div><br></div></div>