[fpc-devel] Re: [fpc-pascal] Re: Ideas for namespace implementation
Marcos Douglas
md at delfire.net
Mon Jul 26 17:11:28 CEST 2010
On Mon, Jul 26, 2010 at 11:55 AM, Sven Barth
<pascaldragon at googlemail.com> wrote:
> [snip]
>> So... maybe create a new directive like as {$NAMESPACE ON}
>>
>> eg.
>>
>> {$NAMESPACE ON}
>> unit strutils namespace my;
>>
>> With {$NAMESPACE ON} all units will have namespaces, unless FPC's units.
>
> Can you explain what you want to achive with that directive, please?
> Currently I don't get that... :(
I said here:
On Mon, Jul 26, 2010 at 12:03 PM, Marcos Douglas <md at delfire.net> wrote:
> On Mon, Jul 26, 2010 at 11:47 AM, Martin <fpc at mfriebe.de> wrote:
>> On 26/07/2010 15:36, Marcos Douglas wrote:
>>> [snip]
>>>
>>> {$NAMESPACE ON}
>>> unit strutils namespace my;
>>>
>>> With {$NAMESPACE ON} all units will have namespaces, unless FPC's units.
>>>
>>
>> Not sure why a directive?
>>
>> To allow none fully qualified names? Then we a back to square one.
>
> To allow ONLY qualified names (using namespaces) not to have syntax
> problems cited earlier (eg. foo.bar.a is using namespace or not?).
> But was just one idea...
If you impose the namespace, the compiler will know if foo.bar.a is a
variable, field, namespace, etc.
MD
More information about the fpc-devel
mailing list