Hi,
I wouldn't really call myself a beginner, but I do feel this might be somewhat of a beginner-question.
Anyway...
What I'd like to do is always use brackets in Blitz, even though "officially" some commands don't require them. Example: according to the docs you have ReadFile(filename$) and DeleteFile filename$.
I don't know why one command uses brackets and the other doesn't, but luckily the commands without brackets also work with them: DeleteFile(filename$).
However, I found something weird.
However, the following variations all DO work:
So my question is: what's the deal with brackets in Blitz? When should I use them and why can't I simply use them for every command?
Sorry if it's been discussed before, I couldn't find the awnser using the search function.
I wouldn't really call myself a beginner, but I do feel this might be somewhat of a beginner-question.
Anyway...
What I'd like to do is always use brackets in Blitz, even though "officially" some commands don't require them. Example: according to the docs you have ReadFile(filename$) and DeleteFile filename$.
I don't know why one command uses brackets and the other doesn't, but luckily the commands without brackets also work with them: DeleteFile(filename$).
However, I found something weird.
If x Then Color(0, 0, 0) Else Color(255, 255, 255)This doesn't work and I get an Expecting ')' error.
However, the following variations all DO work:
If x Then Color(0, 0, 0) If x Then Color(0, 0, 0) Else Color(255, 255, 255) EndIf If x Then: Color(0, 0, 0): Else: Color(255, 255, 255): EndIf If x Then Color 0, 0, 0 Else Color 255, 255, 255
So my question is: what's the deal with brackets in Blitz? When should I use them and why can't I simply use them for every command?
Sorry if it's been discussed before, I couldn't find the awnser using the search function.