Article View: borland.public.delphi.nativeapi
Article #167D8.NET: FillChar
From: Jeffrey A. Wormsley
Date: Mon, 26 Jan 2004 21:15
Date: Mon, 26 Jan 2004 21:15
30 lines
1399 bytes
1399 bytes
What is the best equivalent of the folling use of FillChar in D8.NET? Type TMySubRecord = Record a : Integer; b : String; End; TMyRecord = Record Sub : TMySubRecord; c : Integer; End; Var MyRecord : TMyRecord; Begin MyRecord.Sub.A := 25; MyRecord.Sub.B := 'Some text'; MyRecord.C := 123; FillChar(MyRecord, SizeOf(TMyRecord), #00); End; The end result is all numeric values zero, all strings empty. This example is trivial, just set everything to zero/empty, but with a more complicated structure, this could be a pain in the behind, plus error prone if you left one of the members out. TIA, Jeff.
Technical Details
Message-ID:
<Xns947CAF7E397A7jwormsleyatdebitekdo@207.105.83.66>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f94dd,798a3bcfcff1f8c,start X-Google-Attributes: gidf94dd,public X-Google-ArrivalTime: 2004-01-26 14:40:03 PST Newsgroups: borland.public.delphi.nativeapi Subject: D8.NET: FillChar From: "Jeffrey A. Wormsley" <jwormsley@nospam.debitek.com> Message-ID: <Xns947CAF7E397A7jwormsleyatdebitekdo@207.105.83.66> User-Agent: Xnews/06.01.10 NNTP-Posting-Host: 68.152.88.12 Date: 26 Jan 2004 14:15:05 -0700 X-Trace: newsgroups.borland.com 1075155305 68.152.88.12 (26 Jan 2004 14:15:05 -0700) Lines: 30 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail