Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6255089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:18:03+00:00 2026-05-24T14:18:03+00:00

inspired by the question int a[] = {1,2,}; Weird comma allowed. Any particular reason?

  • 0

inspired by the question int a[] = {1,2,}; Weird comma allowed. Any particular reason? I remembered a question concerning the syntax in Adobe’s Actionscript.

For some reason it is possible (at least in Flex 3) to assign a value to a variable before it was declared:

 public function foo() : void {
      a = 3;
      var a : int = 0;
 }

Does this make any sense..? Is this a bug in the Adobe FlexBuilder compiler? Or is this due to maybe some legacy to older Ecmascript editions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:18:03+00:00Added an answer on May 24, 2026 at 2:18 pm

    An interesting implication of the lack of block-level scope is that you can read or write to a variable before it is declared, as long as it is declared before the function ends. This is because of a technique called hoisting , which means that the compiler moves all variable declarations to the top of the function. For example, the following code compiles even though the initial trace() function for the num variable happens before the num variable is declared…

    Actionscript 3.0 Docs – Variables (quote found about 2/3 down the page)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is inspired by this post: reason for memory leakage in C C++
Inspired by this question . Usually the reason to make copy-constructor and assignment operator
This question was inspired by one I asked almost a year ago - any-orms-that-work-with-ms-access-for-prototyping
inspired by this question since i do not find any good sql casts out
Like : using ::size_t; using ::fpos_t; using ::FILE; In fact it's a question inspired
Inspired by another question asking about the missing Zip function: Why is there no
This question was inspired by a similar question: How does delete[] know the size
This question is inspired by Does Linux provide a monotonically increasing clock to applications
Inspired by this question , I wanted to try my hand at the latest
Inspired by this question and answer , how do I create a generic permutations

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.