A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Variable Types

  1. #1
    \\___unPossible
    Join Date
    Jul 2004
    Posts
    188

    Variable Types

    I got the following quote from the adobe site somewhere while i was reading about AS3
    To help ease the transition to ActionScript 3.0, I've compiled the following list of tips and common issues you might encounter during development.

    Declare types for all variables, parameters, and return values. Declaring a type for all variables, parameters, and return values is not required, but it is considered best practice. It will help the compiler give you more helpful error messages. It also aids runtime performance because the virtual machine will know the types you're working with ahead of time. In fact, it's so important that we've made it a warning by default.
    Does this mean when you set a variable, you need to tell AS3 if it's a Number, Array, etc? Like this?

    Code:
    var i:Number = 0;
    jhilgert
    Cause that's just who I am this week.

  2. #2
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,929
    Yes...strict data typing...good stuff!!
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  3. #3
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,358
    need to? No (finish the sentence you highlighted). Like that? yes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center