I am trying to migrate my own projects in Delphi 2010. But it seems very difficult.
- I use TntControls for older projects. If I remove this library, then some runtime functions should be implemented by me again. For example: Convert UnicodeString to a specified code page.
- "SizeOf", "Length", FillChar () still confuses me, the compiler will throw a warning, if SizeOf () should be replaced with length () but I'm stupid for me - Secure Tutorials are not found.
- A misleading warning, when trying to insert an anestring into the Unicode string. This conversation will not let you lose any data, right?
- Many codes (zip, string utility, etc.) should be re-entered.
Too much headache ... Can Delphi share the experience of migrating existing projects by an existing Delphi 2010?
The compiler warns you when changing the UnicodeString from AnsiString because it is not a simple string assignment, but a conversion guarantees to allocate more memory and at the same time the same character Copies. This is a demonstration warning, not a data-loss warning. Conversions both in the opposite direction (even when specifying Utf8String, which technically will never lose data from UnicodeString, if it is only filled with valid Unicode characters). The best way to avoid warning is to avoid using an anise string in the first place. Except such codes, use plain old string, which in fact requires the code page to know how to encode things.
I do not think the "retention" argument is very strong. Library code should specifically contain unit tests that you have re-compiled every time. Check again is something that you do several times a day;
No comments:
Post a Comment