Re: [Gambas-user] gb3 RC1: using structures to replace the loss of Mk$ functions
Brought to you by:
gambas
From: Kevin F. <kev...@ei...> - 2011-04-03 20:10:01
|
On 04/03/2011 09:33 AM, Jussi Lahtinen wrote: >> With respect to Doriano, how would one use the memcpy() statement in >> GAMBAS? I see from Wikipedia that "void *memcpy(void *dest, const void >> *src, size_t n);" shows the syntax in C. My two questions are, how do >> you call external library functions in gb, and how would you translate >> the C syntax to gb syntax? > Public Extern memcpy(pDest As Pointer, pSrc As Pointer, size As Integer) In > "libc:6" > > Then example in Gambas; > memcpy(Array1.Data, Array2.Data, Array2.Count * SizeOf(gb.Integer)) Awesome, thank you. That's a damn powerful ability that I didn't know about. Time to see what else useful is out there in C-land. :) -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sa...@ei... phone: (770) 853-6271 |