Can blocks be changed so that it is aceptable to start one on the same line as an if or hotkey?
Code:
if (1<2){
MsgBox Ok1
}
if 1<2 {
MsgBox Ok2
}
F12::{
MsgBox Ok12
}
I had a very hard time learning the syntax at first.
I now understand(I think) that if a command for a hotkey is placed on the same line as the hotkey declaration, then it will only use that as a single line command. But if the next line is used, then it is treated as a block and you have to call return?
I kept trying to do things like this and I couldn't understand why the code wouldn't execute:
Code:
F11:: if (1<2)
{
MsgBox Ok11
}
Orignally my code was more like this, but that doesn't even load becuase of the block rules:
Code:
F11:: if (1<2){
MsgBox Ok11
}
Also, I found it very strange and a bit furstrating that the documentation for the IF keyword was not under the "Flow of Control" section of the help. I could only find it by clicking Else, then the link to IF, then the link to "IF (expression)"