Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

"m." is this a system keyword?

The reference manual very breifly mentions m. as follows:
The "this" pointer is "m".


Is this really true, or is m. no different from any other alphabetic character with a . after it?

The manual could really use a lot more detail about some of these things.
Screenshades: The first Screensaver for Roku2!
Musiclouds: The best free internet music, on your Roku!
Ouroborialis: Psychedelic Screensaver for Roku!
0 Kudos
2 Replies
Highlighted
Level 15

Re: "m." is this a system keyword?

m is analogous to this. Don't try to use it for any other purpose or you will have problems. It's not exactly a reserved word, but you certainly can't have any variables named 'm' since it's already being used as a variable name.

-JT
0 Kudos
Highlighted
Level 7

Re: "m." is this a system keyword?

If in a method of a class/object, m refers to the roAssociativeArray that contains the instantiation. If in a plain function, m refers to the global object. This can be handy if you want a plain function with state.
-- GandK Labs
Check out Reversi! in the channel store!
0 Kudos