BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: Help - reference to global variables ?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc
View previous topic :: View next topic  
Author Message
Rob Kennedy
Guest





PostPosted: Tue Dec 09, 2003 10:22 pm    Post subject: Re: Help - reference to global variables ? Reply with quote



Dunric wrote:
Quote:
When names of variables or fields conflicts(are the same),
qualifiyng shall distinguish them.
But HOW TO QUALIFY them when they are not in a unit but IN MAIN
PROJECT FILE ?

You don't. Just like you can't qualify a procedure's local variables.
One of the drawbacks of the "with" keyword. (But please let's not get
into *that* discussion.)

--
Rob

P.S. Cross-posting to Borland and non-Borland newsgroups is futile.
Borland's servers don't accept outside feeds. Your message only arrived
at one newsgroup of the four your targetted.

Back to top
VBDis
Guest





PostPosted: Fri Dec 12, 2003 8:37 am    Post subject: Re: Help - reference to global variables ? Reply with quote



Im Artikel <2d5404f4.0312091359.508166d4 (AT) posting (DOT) google.com>, [email]dunric (AT) centrum (DOT) cz[/email]
(Dunric) schreibt:

Quote:
But HOW TO QUALIFY them when they are not in a unit but IN MAIN
PROJECT FILE ?

IMO project files are units, only with a different file extension. I didn't try
to check this - did you?

Quote:
program test;

Suggests to me to qualify with "test.".

Quote:
with myRec do

This is just the opposite of qualifying!

Remove that line, and qualify as usual:

Quote:
myInst := {global_dpr_scope.}myInst; // !!!!!!!!!! how ?

will then become
myRec.myInst := myInst; //you see WHICH name really needs qualification?

DoDi

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.