Why most Delphi examples use FillChar() to initialize records?

前端 未结 8 2091
离开以前
离开以前 2020-12-13 06:32

I just wondered, why most Delphi examples use FillChar() to initialize records.

type
  TFoo = record
    i: Integer;
    s: string; // not safe in record, b         


        
8条回答
  •  别那么骄傲
    2020-12-13 07:06

    Here is a better way to initialize stuff without using FillChar:

    Record in record (Cannot initialize)
    How to initialize a static array?

提交回复
热议问题