[DGD] sizeof(static string *buffer)

Thomas Edward Mieczkowski tmieczkowski at gmail.com
Mon Sep 13 06:36:50 CEST 2004


thanks.  that just taught me one of the differences between the LP
variant which i am most accustomed to coding on and DGD.   (Are you
reading this, Mr. Finke?)


On Sun, 12 Sep 2004 04:34:06 -0400 (EDT), Michael McKiel
<crashnbrn71 at yahoo.ca> wrote:
>  --- Thomas Edward Mieczkowski <tmieczkowski at gmail.com> wrote:
> > i'm a relative DGD newbie (fairly expert at LPC however), but it
> > appears as though buffer is not initialized for some reason, which
> > would cause legacy LPC sizeof() to error based on the fact it is 0
> > (LPC's way of noting null).  I believe in DGD it works the same way.
> > So, you may want to replace
> >
> > if(sizeof(buffer))
> >
> > with
> >
> > if(buffer && sizeof(buffer))
> >
> > or determine why buffer is not being initialized.
> 
> Solution sounds about right to me, but your '0' assumption could be a little
> off, depending on how 'strict' you make dgd within its config file, all
> strings, mixed and objects types (non numeric data types) are pre-initialized
> to "nil" which is quite a bit different from a string being later assigned a
> value of zero.
> 
> 
> ______________________________________________________________________
> Post your free ad now! http://personals.yahoo.ca
> 
> 
> _________________________________________________________________
> List config page:  http://list.imaginary.com/mailman/listinfo/dgd
>
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list