jaberwacky 327 Posted October 10, 2011 (edited) 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 October 10, 2011 by LaCastiglione Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites
Richard Robertson 187 Posted October 11, 2011 For loop doesn't work because there isn't a keyword or operator terminating the statement. This is a failing point of BASIC rather than AutoIt specifically. Constants with no value make no sense. That's a failure on your part. Share this post Link to post Share on other sites
jaberwacky 327 Posted October 11, 2011 I thought a constant without a value automatically = '' Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites
Valik 479 Posted October 11, 2011 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. Share this post Link to post Share on other sites
jaberwacky 327 Posted October 11, 2011 Thanks Valik. Well, it serves no practical purpose. I was just wondering what variables are automatically assigned to behind the scenes. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites
Richard Robertson 187 Posted October 11, 2011 You should never rely on unassigned variables having any value. That's programming 101. Share this post Link to post Share on other sites
jvanegmond 307 Posted October 11, 2011 For someone who is a nitpick, you missed all the things which deserve being nitpicked over. AutoIt isn't perfect, but these are definitely not its imperfections. github.com/jvanegmond Share this post Link to post Share on other sites
jaberwacky 327 Posted October 11, 2011 Well, I wasn't criticizing AutoIt. AutoIt is a great language which I use daily. I was just curious is all. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites
jvanegmond 307 Posted October 11, 2011 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. github.com/jvanegmond Share this post Link to post Share on other sites
jaberwacky 327 Posted October 12, 2011 Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites