# From here on out, make them all static/public/private

**URL:** <https://forum.kirupa.com/t/from-here-on-out-make-them-all-static-public-private/295733>\
**Category:** Uncategorized\
**Created:** [September 3, 2009, 4:26pm UTC](https://forum.kirupa.com/t/from-here-on-out-make-them-all-static-public-private/295733 "2009-09-03T16:26:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IQAndreas](https://avatars.discourse-cdn.com/v4/letter/i/f08c70/32.png) [@IQAndreas](https://forum.kirupa.com/u/IQAndreas)\
**Post date:** [September 3, 2009, 4:26pm UTC](https://forum.kirupa.com/t/from-here-on-out-make-them-all-static-public-private/295733/1 "2009-09-03T16:26:33Z")

</div>

I have no idea what it is called, but many languages have a quite simple feature that says "From this point on, all variables and functions from this point on, unless otherwise noted, will be public (or private or static).

Yes, I know this code is poorly structured. That’s not the point. The point is the “public:”, “private:” and “static:” commands.

```auto
public class myClass
{
   public: //Observe this command makes the function below public

      function myClass()
      {
          myClass.instanceList.push(this);
          myClass.totalInstances ++;
          myNumber = myClass.totalInstances;
      } 

   private:

      var myNumber:int;

   static: //And both these variables are static (and because I didn't use a namespace, are automatically internal)
   
      var instanceList:Array = new Array();
      var totalInstances:int = 0;
}

```

Has ActionScript with all it’s flaws and foibles (but now finally with typed arrays!) created at least this type of feature?
