In our previous episode, Graeme Geldenhuys said: > > But namespaces are functional in Delphi - not just cosmetic. So are you > saying that FPC doesn't have the same functional ability as Delphi when > it comes to namespaces? > > The following is how somebody explained Delphi namespaces to me: > > In stead of having directories like this with the same unit names and > having to use IFDEF's and play with unit paths...
Something like that yes, if various frameworks use similar unitnames. > ...instead you can flatten the directory hierarchy to simply a single > GUI directory as follows: > > /GUI/VLC.tiMediators.pas > /GUI/VLC.tiListMediators.pas > /GUI/LCL.tiMediators.pas > /GUI/LCL.tiListMediators.pas > /GUI/FMX.tiMediators.pas > /GUI/FMX.tiListMediators.pas > > > That way we don't need $IFDEFs or special Unit Search Paths, just > specify "FMX" or "VCL or "LCL" in the Project Unit Scope names list. > > You then simply refer to those units in your uses clause by using: Not entirely, since you can afaik use the whole unit names qualified ? So the "real" core module name is now the qualified one, even if you can omit the prefix ^H^H^H^H namespace under certain circumstances. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal