AS2 variable type

Out of context: Reply #12

  • Started
  • Last post
  • 13 Responses
  • skel0

    I use the ":Void" treatment (well... ":void" in AS3) But that may be only because I think it helps declare the purpose of the function better as a non-returning function.

    I suppose it helps the compiler help you... if you make like this:

    function blah() {
    return;
    }

    var foo:String = blah();

    Does the compiler throw an error without the ":Void" ?

    *too lazy to try*

View thread