[fpc-devel] Purpose of "uses ... in"?

Stefan Kisdaroczi kisda at hispeed.ch
Wed Jul 14 19:55:57 CEST 2010


On 14.07.2010 18:54, Marcos Douglas wrote:
> On Wed, Jul 14, 2010 at 12:59 PM, Mattias Gaertner
> <nc-gaertnma at netcologne.de> wrote:
>   
>> On Wed, 14 Jul 2010 12:51:29 -0300
>> Marcos Douglas <md at delfire.net> wrote:
>>
>>     
>>> On Wed, Jul 14, 2010 at 12:32 PM, Mattias Gaertner
>>> <nc-gaertnma at netcologne.de> wrote:
>>>       
>>>> On Wed, 14 Jul 2010 12:23:00 -0300
>>>> Marcos Douglas <md at delfire.net> wrote:
>>>>
>>>>         
>>>>> On Wed, Jul 14, 2010 at 11:45 AM, Mattias Gaertner
>>>>> <nc-gaertnma at netcologne.de> wrote:
>>>>>           
>>>>>> On Wed, 14 Jul 2010 10:26:11 -0300
>>>>>> Marcos Douglas <md at delfire.net> wrote:
>>>>>>             
>>>>> [...]
>>>>>           
>>>>>>> I am surprised as there is no conflict of names of units in the FPC / Lazarus.
>>>>>>>               
>>>>>> Of course there are. For example unit dialogs. This is solved by the
>>>>>> search path.
>>>>>>             
>>>>> And if do you have your own unit Dialogs too, what you do?
>>>>>           
>>>> Me? I would rename my unit.
>>>>         
>>> Hum... Okay, but if this unit (Dialogs, in your example) is part of
>>> another framework, not yours?
>>>       
>> I would tell the devels of the framework.
>> And if they want to keep it, then I can not use both Dialogs units. I
>> had not yet the case where I needed both and can not rename both.
>>     
> Then, another example:
> You want to work with ZIP and RAR format files. So, imagine you found,
> on the net, 2 libs, one for each type format. The problem is each lib
> uses the same name to main unit e.g. zip.pas.
>
> Both libs are very used by million of people on the world and they,
> the developers do not want to change the name of yours unit.
>   

create a rar.pas containing only the line:
  {$include rar/zip.pas}

compile with:
  fpc -Un rar.pas

-Un        Do not check where the unit name matches the file name


regards
Stefan

> And now, you understood the little problem?
>
>
> MD.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>   


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20100714/45d4cd06/attachment.sig>


More information about the fpc-devel mailing list