Hi, Fpc sometimes complains (hints) about local variables not being initialized. My question: how do I initialize more complicated structures like records? And should I need to (I'm guessing no in the example below, but the contents of the record will be undefined - no problem as there are no pointers/strings in there)?
Example: .... Type TIfdTag = packed Record ID: word; //Tag number Typ: word; //Type tag Count: cardinal; //tag length Offset: cardinal; //Offset / Value End; .... Var tag: TIfdTag; .... in code somewhere ReadTag(tag); As TIfdTag seems to contain non-pointer records only, I thought I could use Sizeof and tried this: FillByte(tag, SizeOf(tag), 0); //initialize var. The compiler warning doesn't go away though. Is this the recommended way of doing things? Thanks, -- Regards, jb _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal