[DGD] typeof bug?

Robert Forshaw iouswuoibev at hotmail.com
Wed Mar 30 20:20:02 CEST 2005


string a;

return typeof(a) == T_STRING;

Returns 0. If I allocate an empty string to a, then it returns 1. typeof(a) 
== T_NIL returns 1 of course, but shouldn't there be a priority to refer to 
the type of data the variable could hold, rather than what it happens to be 
holding at the time? Or perhaps there should be another function: datatype - 
which returns the datatype of the variable rather than its present content? 
Or is there a way of doing that already?

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! 
http://www.msn.co.uk/messenger




More information about the DGD mailing list