Re: RES: [fpc-pascal] dot within unit file name

2008-01-20 Thread Vinzent Hoefler
On Friday 18 January 2008 20:12, John Stoneham wrote: [Ada package system] > However, you can also do: > with Unit_1; use Unit_1; > This imports the namespace of Unit_1 into the current file so that > now you *can* refernce "foo" without a qualifier. It's as if all the > identifiers in Unit_1 w

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Marco van de Voort
Jonas wrote: > >> The magic word would be "scope" here. It's the same as with using two > >> different units including the same identifier twice. > > > > Yes and no, of course it will work, but might be counterintuitive. > > > > uses x, a.b.c; > > > > a.b.c.d. > > > > if x also contains an identif

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread John Stoneham
On 1/18/08, Vinzent Höfler <[EMAIL PROTECTED]> wrote: > > On the other hand: > > > > uses a; > > > > var a:byte; > > > > ... both unit a as variable a would go into the global symtable, which > > is the same lexical level, thus causing duplicate identifier conflicts. > > In Ada the fully qualified

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Vinzent Höfler
Daniël Mantione wrote: Op Fri, 18 Jan 2008, schreef Vinzent Höfler: Maybe my view is skewed too much by the use of Ada where even a function declares a "record identifier". In Ada it is even possible to do: --- procedure Test is X : Integer; procedure B is X : Integer; begin

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Vinzent Höfler
Michael Van Canneyt wrote: You are wrong. It does not compile, neither in delphi, nor in FPC. D is not found, because 'A' resolves to the local a, and then the search is stopped. Ok, I think I got it. It's probably the same reason why in --- procedure Foo (const A : My_Type); overload; proce

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Daniël Mantione
Op Fri, 18 Jan 2008, schreef Vinzent Höfler: Maybe my view is skewed too much by the use of Ada where even a function declares a "record identifier". In Ada it is even possible to do: --- procedure Test is X : Integer; procedure B is X : Integer; begin X := 1; Tes

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Vinzent Höfler
Daniël Mantione wrote: Op Fri, 18 Jan 2008, schreef Vinzent Hoefler: On Friday 18 January 2008 16:04, Michael Van Canneyt wrote: On Fri, 18 Jan 2008, Daniël Mantione wrote: Op Fri, 18 Jan 2008, schreef Michael Van Canneyt: To the user, it may appear as a bunch of dots. To the compiler, it d

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Marco van de Voort
> On Friday 18 January 2008 15:50, Michael Van Canneyt wrote: > > > > Of course not: > > > > tell me, what does a.b.c.d mean if you have a record a with field b, > > and you have a uses a.b.c in your uses clause ? > > The magic word would be "scope" here. It's the same as with using two > differe

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Jonas Maebe
On 18 Jan 2008, at 16:35, Marco van de Voort wrote: The magic word would be "scope" here. It's the same as with using two different units including the same identifier twice. Yes and no, of course it will work, but might be counterintuitive. uses x, a.b.c; a.b.c.d. if x also contains an id

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Vinzent Hoefler
On Friday 18 January 2008 16:04, Michael Van Canneyt wrote: > On Fri, 18 Jan 2008, Daniël Mantione wrote: > > Op Fri, 18 Jan 2008, schreef Michael Van Canneyt: > > > To the user, it may appear as a bunch of dots. To the compiler, > > > it doesn't know how to map the a.b.c.d: > > > > Well, with norm

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Daniël Mantione
Op Fri, 18 Jan 2008, schreef Vinzent Hoefler: On Friday 18 January 2008 16:04, Michael Van Canneyt wrote: On Fri, 18 Jan 2008, Daniël Mantione wrote: Op Fri, 18 Jan 2008, schreef Michael Van Canneyt: To the user, it may appear as a bunch of dots. To the compiler, it doesn't know how to map

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Michael Van Canneyt
On Fri, 18 Jan 2008, Vinzent Hoefler wrote: > On Friday 18 January 2008 16:04, Michael Van Canneyt wrote: > > On Fri, 18 Jan 2008, Daniël Mantione wrote: > > > Op Fri, 18 Jan 2008, schreef Michael Van Canneyt: > > > > To the user, it may appear as a bunch of dots. To the compiler, > > > > it doe

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Michael Van Canneyt
On Fri, 18 Jan 2008, Vinzent Hoefler wrote: > On Friday 18 January 2008 15:50, Michael Van Canneyt wrote: > > On Fri, 18 Jan 2008, Vinzent Hoefler wrote: > > > On Friday 18 January 2008 15:19, Michael Van Canneyt wrote: > > > > > I saw this week a CodeGear Guy in a cg ng talking about that. > >

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Vinzent Hoefler
On Friday 18 January 2008 15:50, Michael Van Canneyt wrote: > On Fri, 18 Jan 2008, Vinzent Hoefler wrote: > > On Friday 18 January 2008 15:19, Michael Van Canneyt wrote: > > > > I saw this week a CodeGear Guy in a cg ng talking about that. > > > > In Win32 its is Just dots in the name, nothing else

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Daniël Mantione
Op Fri, 18 Jan 2008, schreef Michael Van Canneyt: On Fri, 18 Jan 2008, Daniël Mantione wrote: Op Fri, 18 Jan 2008, schreef Michael Van Canneyt: To the user, it may appear as a bunch of dots. To the compiler, it doesn't know how to map the a.b.c.d: Well, with normal Pascal rules, you

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Michael Van Canneyt
On Fri, 18 Jan 2008, Daniël Mantione wrote: > > > Op Fri, 18 Jan 2008, schreef Michael Van Canneyt: > > > To the user, it may appear as a bunch of dots. To the compiler, it doesn't > > know how to map the a.b.c.d: > > Well, with normal Pascal rules, you cannot declare a variable with the sam

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Daniël Mantione
Op Fri, 18 Jan 2008, schreef Michael Van Canneyt: To the user, it may appear as a bunch of dots. To the compiler, it doesn't know how to map the a.b.c.d: Well, with normal Pascal rules, you cannot declare a variable with the same name as a unit you use, because a unit is also an identifier.

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Marco van de Voort
> On Fri, 18 Jan 2008, Vinzent Hoefler wrote: > > > On Friday 18 January 2008 15:19, Michael Van Canneyt wrote: > > > > > > I saw this week a CodeGear Guy in a cg ng talking about that. > > > > In Win32 its is Just dots in the name, nothing else. > so > > unit a.b.c;

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Michael Van Canneyt
On Fri, 18 Jan 2008, Vinzent Hoefler wrote: > On Friday 18 January 2008 15:19, Michael Van Canneyt wrote: > > > > I saw this week a CodeGear Guy in a cg ng talking about that. > > > In Win32 its is Just dots in the name, nothing else. > > > > If he said that, he is totally braindead and doesn't

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Vinzent Hoefler
On Friday 18 January 2008 15:19, Michael Van Canneyt wrote: > > I saw this week a CodeGear Guy in a cg ng talking about that. > > In Win32 its is Just dots in the name, nothing else. > > If he said that, he is totally braindead and doesn't have a clue > about what he is talking. Well, the discuss

RES: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Cesar Liws Gmail
> > - Can someone provide the grammar how an identifier looks like in Delphi? > > - How shall the compiler detect that "a.b" is an unit if a is also defined > as a record that > > doesn't contain a field b? > > - How shall the compiler handle if "a.b.c" is an unit and a.b.c is class? > > > > So p

Re: RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Michael Van Canneyt
On Fri, 18 Jan 2008, Cesar Liws Gmail wrote: > > > -Mensagem original- > De: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Em nome de Marco van de > Voort > Enviada em: sexta-feira, 18 de janeiro de 2008 06:05 > Para: FPC-Pascal users discussions > Assunto: Re: [fpc-pascal] dot within

RES: [fpc-pascal] dot within unit file name

2008-01-18 Thread Cesar Liws Gmail
-Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de Marco van de Voort Enviada em: sexta-feira, 18 de janeiro de 2008 06:05 Para: FPC-Pascal users discussions Assunto: Re: [fpc-pascal] dot within unit file name > - Can someone provide the grammar how an identif