[fpc-pascal] Initialization of packed record local variables?

Bo Berglund bo.berglund at gmail.com
Fri Jul 22 08:12:01 CEST 2016

On Mon, 18 Jul 2016 23:30:47 +0200 (CEST), Michael Van Canneyt
<michael at freepascal.org> wrote:

>> Are there other commands it does detect as initialization of the
>> variable?
>not that I know of.
>you need to assign it a value, you can assign it default(yourtype)

OK, I did not know about the default keyword.

Is "default" zero?

  HD: TSSReadingHeader;
  HD := Default(TSSReadingHeader);

And now HD.anything is zero?

Bo Berglund
Developer in Sweden

More information about the fpc-pascal mailing list