herewasplato Posted June 8, 2009 Posted June 8, 2009 ... As for why is While 1 = 1 bad? I wrote a long reply to that last night and then when I went to post it the forum was down for backup but here is the core argument. It works but it's a bad coding practice primarily because of the confusion it can cause new posters. ...I must be looking at this all wrong then... I have only had to explain this a few times to a few people but each time the question came up "How can 1 be an expression?" They had no problem grasping that the loop would continue as long as 1 = 1 or 2 = 2 or "apple" = "apple" or ....If I know their educational background covered Boolean expressions, then I'll mention that - but either way, "1 = 1" sure lends itself to a new person realizing that other expressions can used.So, how should I answer the question, "How can 1 be an expression?"And how can "1 = 1" confuse folks?I don't mean it to sound like I'm arguing - I'm just questioning because I would like to understand this point better. All I've even seen are statements like "it is bad coding practice".As far as my question about 1 = 1 not working in future releases - it was prompted by this post:http://www.autoitscript.com/forum/index.ph...st&p=689352 [size="1"][font="Arial"].[u].[/u][/font][/size]
GEOSoft Posted June 9, 2009 Posted June 9, 2009 I knew you were not arguing. I can read between the lines of your posts (usually) but here is a classic example of why I like to keep it simple for newcomers.#693062I know it doesn't use While 1 = 1 but none the less it shows how people will mis-read and mis-use a bit of information. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now