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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what means the m. in front of a variable? 3

Status
Not open for further replies.

Paco75

Programmer
Oct 11, 2001
239
US
Hi,

I have seen some m.variable things in some code... why is there a m. before? Im asking because i got an bug in a case where a field from a table has the same name than a m. variable...

let's say i got mytable.myfield and m.myfield and if i do Vartype(myfield) to verify the mytable.myfield and it seems to do it on m.myfield instead.

thanks
 
Mike, Olaf,

Hmm interesting discussion, understand your point agree that 'object' could also be confusing for m., could not find an other word to define this guy and now agree 100% with Dan, we shall call it a 'scope identifier' and not a prefix.

Regards,

Jockey(2)
 
I'm happy to go along with scope identifier, although I'm not sure why. When you say "scope", I think of things like local, private and public. The m. can be any of those. It's more like a "variable as opposed to field" identifier.

But let's not worry too much about it.

The main point is that Paco needed to know how to release a variable. We've explained that, and he's happy with it, so let's not stir up any more confusion.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Mike,

agreed, also about scope identifier. And agreed that's for future reference, the discussion in regard to the thread is completed, as long as Paco has no further question on the subject.

Bye, Olaf.
 
I'm happy to go along with scope identifier, although I'm not sure why. When you say "scope", I think of things like local, private and public. The m. can be any of those. It's more like a "variable as opposed to field" identifier.

Well, in the language "scope" also refers to location, such as ALL, REST, NEXT <n>, FOR <expr>.

But I'm not sure where my head was. <sigh> I said scope but meant alias. In the following:

customer.address

We know "customer." as the alias of the address value. In the following:

m.address

The "m." is still the alias.
 
The final word on that from me - promise! (fingers crossed):
alias is really very bound to an alias name and as in the natural language meaning mainly adresses the possibility for an alternate name, as the alias clause of USE also is just needed in that case, really.

On the other side scope is in general a term for the area of validity. So scope actually fits better and your head was just right when thinking that way. alias has the same weakness as object, it's really not describing what this is.

If you fear the double meaning of memory scope m. and variable scope local, private, public, then we could still go back to Microsofts term of qualifier.

Well, next time the topic arises, it's quite probable it will be referred to as mdot(s) or m. anyway.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top