On 4 Mar 2005 at 18:43, Waldek Hebisch wrote:
[...]
GPC allows the following:
program foo; type fsi = function(s : string): integer; var fp : fsi; i : integer; function GetProcAddress : pointer; begin GetProcAddress := nil end; begin fp := fsi(GetProcAddress); i := fp('') end .
Of course, since my `GetProcAddress' return nil it will crash at runtime. However, with proper external declaration of `GetProcAddress' and `LoadLibrary' and assuming that fsi is correct it should work. On Windows you have to remember to use correct calling convention, but that is not different that calling external functions via import librarires.
So, AFAICS you can not entiterly omit info about arguments
[...]
So, how come gcc can do it? Is this a peculiarity of C compilers, or is it something unique to gcc than cannot possibly be enabled in gpc?
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/