1 Reply Latest reply on Sep 12, 2006 5:24 AM by pwiop

    array

    Caurj
      what is the difference between using:

      var test:Array = [1,2,3,4,5,6,7,8];

      and

      test = [1,2,3,4,5,6,7,8];
        • 1. Re: array
          pwiop Level 1
          although they may both achieve the same the first one is correct as it uses 'strict data typing". this means the variable is declared, in this case as an array object type, and then is given values.

          Flash is quite relaxed in the way it handles variables in as much as you can use
          pete = 23
          pete = "pete"
          pete = true
          although all three examples use different datatypes (number, string, boolean) none needs to be explicily dclared. In languages such as visual basic you are generally required to declare the variable type as you instansiate it.

          I believe AS3 will be stricter