Jump to content

Array indexer characters []


Recommended Posts

We've got the BASIC syntax everywhere, except in the indexer characters. BASIC uses parenthesis and C/C++/C#/etc uses the brackets. What happened there?

Array[0] = {error for basic, array subscript one for AutoIt}

Array(0) = {array subscript one for BASIC, Func Array($arg) for AutoIt}

What happened there?

i think it's because only the front end of the language that we're using is syntaxually like basic, the workhorse behind the abstraction is still c++ which if i'm not mistaken uses [] instead of (). it is also probably easier for the compiler to parse that way, because parentheses will always mean a function call, and brackets will always mean a subscript. Personally i like having them different because it helps make code more readable even to the human eye.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...