Umesh Patil
Umesh Patil

Reputation: 10705

Action script coding standards

I am very good java script developer, but newbie to flash. I have started learning action script. I am reading code snippets at many places. I found that variable names starting with m_Variable_Name or _Variable_name. What does that mean when it starts with m_ or _ ? Can anyone throw a light on coding standard?

Sample code :

 public class Person implements IPerson
 {
  private var m_name:String;

  public function get name():String
  {
   return m_name;
  }

  public function set name(value:String):void
  {
   m_name = value;
  } 
 }

Upvotes: 4

Views: 2398

Answers (3)

sch
sch

Reputation: 27536

Here are Adobe Coding Conventions.

Some people use m_ or _ to prefix member variables to distinguish them from local variables.

Upvotes: 11

crooksy88
crooksy88

Reputation: 3851

Prefixing variable names is not a requirement, it's more of a naming convention that you might choose to use.

Upvotes: 3

Jordan
Jordan

Reputation: 530

prefixes m_ is used as a prefix for member variables.

Upvotes: 3

Related Questions