AdamRo Posted February 26, 2008 Share Posted February 26, 2008 Hi, Does the concept of prototyping functions or declaring external variables exist in AutoIt? I have a library file that contains a load of constants. The test scripts then include this constants file and uses the variables within it however when doing a syntax check there are always warnings... "possibly used before declaration" Is there a way to remove these warnings through the code? In C I would declare an external variables in the current file, a kind of prototype so the current file knows that this variable is in fact declared and ready to use. Any suggestions? How is this normally taken care of in AutoIt()? Thanks, Adam Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 26, 2008 Share Posted February 26, 2008 Hi,Does the concept of prototyping functions or declaring external variables exist in AutoIt?I have a library file that contains a load of constants. The test scripts then include this constants file and uses the variables within it however when doing a syntax check there are always warnings..."possibly used before declaration"Is there a way to remove these warnings through the code? In C I would declare an external variables in the current file, a kind of prototype so the current file knows that this variable is in fact declared and ready to use. Any suggestions? How is this normally taken care of in AutoIt()?Thanks,AdamLook up #include in the help file. The syntax checker in the full version of SciTE4AU3 is fully aware of included files and will not give you the false warnings. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
GEOSoft Posted February 26, 2008 Share Posted February 26, 2008 Hi,Does the concept of prototyping functions or declaring external variables exist in AutoIt?I have a library file that contains a load of constants. The test scripts then include this constants file and uses the variables within it however when doing a syntax check there are always warnings..."possibly used before declaration"Is there a way to remove these warnings through the code? In C I would declare an external variables in the current file, a kind of prototype so the current file knows that this variable is in fact declared and ready to use. Any suggestions? How is this normally taken care of in AutoIt()?Thanks,AdamIs the file containing the constants an *.au3 file? If it is then #include it at the top of the script.If not then what is the file type and how are you declaring those constants in your script? 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!" Link to comment Share on other sites More sharing options...
AdamRo Posted February 26, 2008 Author Share Posted February 26, 2008 My mistake... they are au3 files however the specific constants were not declared afterall. ( I did not write the code, only trying to validate it. The "developers" checked in a load of files yesterday and when doing a syntax check I noticed all these warnings and assumed that was the problem, they must have removed some). I think I'll have to have a little word with them... Sorry, thanks for the info. Adam Link to comment Share on other sites More sharing options...
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