Jump to content

A couple of nitpicky things ...


jaberwacky
 Share

Recommended Posts

I have noticed a couple of things that I hope are not too nitpicky. I have a history of being really nitpicky.

You can do this:

Global $variable1 = True
If $variable1 = True Then ConsoleWrite("True" & @LF)

But not this:

Global $counter = 0
For $i = 0 To 9 $counter += 1

Also, this:

Global Const $variable = ''

But not this:

Global Const $variable

I'm not a computer scientist so I'm wondering what goes on behind the scenes to cause this. Discuss.

Edited by LaCastiglione
Link to comment
Share on other sites

What practical purpose does declaring an empty constant serve? It's constant, you can't change the value to something meaningful later. If it's empty and will always be empty (implied by it being constant) then you likely have some logic error in your code that is creating a situation where you would need an empty constant.

As for the For loop, that is merely a syntactic choice. We terminate things with explicit keywords. Other languages use curly brackets. Python uses indentation, et cetera. There is minimal need for supporting single-line For statements as most For statements are not so trivial.

Link to comment
Share on other sites

Well, I wasn't criticizing AutoIt. AutoIt is a great language which I use daily. I was just curious is all.

I wanted to edit my post but I forgot, and doing so now means you probably wont see it. Here's what I wanted to add:

I challenge you to find some things in AutoIt worth nitpicking. You were curious about syntax, so that would be my first suggestion.

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...