Oxygene. SizeOf(EmptyRec) <> 0?


(Kazantsev Alexey) #1
type
 EmptyRec = record
 end;

sizeOf(EmptyRec) = 1; // why? (Island Windows, .NET)

(Carlo Kok) #2

You can’t have an empty record in elements so we add a dummy field. Byte sized.


(Jolyon Direnko-Smith) #3

we add a dummy field. Byte sized.

That seems needlessly inefficient. Couldn’t you make it a dummy bit instead ?

</joke> :slight_smile: