Page 1 of 1

Related to 0 elements in a field of a Structure

Posted: Fri Nov 17, 2006 8:56 am
by Psychophanta
Related to the Fred's conclusion in http://www.purebasic.fr/english/viewtopic.php?t=22327 :
Shouldn't be better that compiler complains with a '0 elements for a field is not allowed' error or something similar, instead of return a 0 for SizeOf() ?

Posted: Fri Nov 17, 2006 11:31 am
by Trond
But 0 elements IS allowed, so why should the compiler complain? 0 elements is for an array of unknown size.