Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is meant by '..' the two points?

Status
Not open for further replies.

RedLion

Programmer
Sep 13, 2000
342
0
0
NL
Hello I've got a little question,

I found an example, and I didn't know exactly what they mean by the two points?

example:

lparameters tnMenu local lnI, lcMenu
lnI = 1 lcMenu = "oMenu" + allt(str(lnI))
do while .t.
if type(lcMenu) <> &quot;O&quot; or isnull(&lcMenu)
exit
else
if &lcMenu..cModuleID = curMenu.cRunMenu
&lcMenu..show && <= The two points here, what
return && do they mean?
endif
lnI = lnI + 1
lcMenu = &quot;oMenu&quot; + allt(str(lnI))
endif
enddo
tnMenu = lnI
return lcMenu

What does it mean, and what can you do with it?


Thanks Charl [sig][/sig]
 
You must type &lcMenu..show so that Visual Fox know that &quot;&lcMenu.&quot; is macro variable and one &quot;.&quot; left for the expression.

If you type &lcMenu.show , Fox will understands &quot;lcMenu&quot; as an object or an alias.

Hope it helps

JimmyK [sig][/sig]
 
When using macro expansion the first dot marks the end of the variable name to be expanded. Anything following that is considered part of the expanded expression. So;

lcVar = &quot;MyObject&quot;

? &lcVar.Name && Expands to MyObjectName
? &lcVar..Name && Expands to MyObject.Name

In the second example the first dot tells VFP that the variable to expand is lcVar and then to append .Name to the expanded value.
[sig]<p>JimBooth<br><a href=mailto:jbooth@jamesbooth.com>jbooth@jamesbooth.com</a><br><a href= Booth Consulting Site</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top