To Walter, about char[] initialization by FF

Andrew Fedoniouk news at terrainformatica.com
Wed Aug 2 00:08:42 PDT 2006


> I think the issue is more that Andrew wants to have hex-FF as a legitimate
> byte value anywhere in a char[] variable. He misses the point that the
> purpose of not allowing it in so we can detected uninitialized UTF-8
> strings at run-time.
>

What does it mean uninitialized? They *are* initialized.
This is the main point. For any types you can declare
initial value. I bet you are choosing not non existent values
for say enums but some really meaningfull default values.

having strings filled by ff's means that you will get problems
of different kinds - partially initialized strings.

Could you tell me do you ever had situation when
ffffff strings helped you to find problem?
And if yes how it is in principle different from
catching strings with 00000?

Can anyone here say that this fffffffs helped to find
problem?

Andrew.



 





More information about the Digitalmars-d mailing list