Search the Community
Showing results for tags 'const'.
-
It might not need to be fixed, but I found it strange that Const are not checked first, before everything else. I wrote a UDF and I used/declared a Const variable in the main script, but when I went to compile the script, I got a warning message stating that my variable was not declared in one of my included UDFs, yet I declared it in the main script. Once I put the Const variable declaration above the include statement for the UDF, the warning went away. I guess I thought that Const variables would be declared first above all else, as they are constants? With that in mind, a UDF that declares Const values would need to be put before any UDF's that were to use that Const...I would think that would be a nightmare, to have to make sure one UDF is above another one for declarations. Is this by design, and can it be changed? On another note, after you close the script, the warning UDF is opened in Scite, making it a bit of a pain to have to go back to the original script. And in order for me to get rid of the warning in my UDF, I have to go to the line above it and hit delete, then hit enter, to make the format correct again. I have even tried Tidy and that only works sometimes - can we also look at fixing that hotkey, to remove any Scite messages in the script - no, not the lines inputted by Tidy, but the ones before Tidy is ran.