David J Taylor wrote:
> Doug Chamberlin wrote:
>> The assert procedure might be useful for this. For example, place
>> these lines at the beginning of each string handling function:
>>
>> Assert(Length(Char)=1,'This function not checked for unicode!');
>>
>> Then, when you do get around to checking the function for
>> compatibility with unicode you can remove the assert call.
> 
> Another one which has come up on the Codegear newsgroups is using FillChar 
> when you really meant ZeroMemory.  Number of bytes zeroed will be 
> different...

I think the important piece of information from that thread is that 
FillChar's behavior *hasn't* changed, despite its name. Its second 
parameter is and always has been the number of *bytes* you intend to 
fill with the third parameter's byte-sized ordinal value. So if "SizeOf" 
doesn't appear somewhere in that parameter, you're probably calling it 
wrong.

-- 
Rob
_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to