Back there when I use Delphi 2006 it was:
uses System, SysUtils, StrUtils, Windows, Dialogs, WinApi;
But recently we can use:
uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics;
How this change works? Does they separated the System.pas
into System.*.pas
or did they created a new clause for separating function by types in a single library?
How do I modify my old libraries to work like this? I want to do make something like: MyLib.Logic, MyLib.Arrays, MyLib.NetWork etc.
Just open your old files in the ide, and in the project manager rename the unit. It'll automatically change the unit name inside the file.
After that, open and recompile your old projects to make sure that you refer to the right unit names.
The only advantage of these dots over something like an underscore seems to be that you can get a list of matching "sublibraries" in code completion.
The part before any dots shouldn't be called a "namespace", because it doesn't work like one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With