[fpc-pascal] RE: Problem translating c code to pascal
    Felipe Monteiro de Carvalho 
    felipemonteiro.carvalho at gmail.com
       
    Sat Sep 30 16:48:29 CEST 2006
    
    
  
Ok, after a lot of headaches and making questions on ##c freenode
channel I found out what that is.
The structure is a NULL-terminated array / table. It was declared like this:
static const handler_rec hw_handlers[] = {
    { "hw-app", hw_handle_req },
    { NULL }
};
But that is just the short declaration for something like this:
static const handler_rec hw_handlers[] = {
    { "hw-app", hw_handle_req },
    { NULL, NULL }
};
So it´s an array of size 2, where the second element is filled with
NULLs, but it will be interpreted as an array of size 1, because the
last element marks the end of the array.
-- 
Felipe Monteiro de Carvalho
    
    
More information about the fpc-pascal
mailing list