Dirk98 Posted September 23, 2007 Share Posted September 23, 2007 Can any kind sole explain what is DIM, variable, constant and array to me? I don't understand the short explanation and examples in the Help. Or do you know a resource where I can get myself some education in these concepts? But since I'm not going to plunge too deep, I would very much appreciate if you give your everyday understanding of them. Many thanks! Dirk. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 23, 2007 Moderators Share Posted September 23, 2007 Dirk, I'd suggest using Google... To be honest, it would take a lot of work to try and explain each of those to your understanding.Thank goodness for you that there have people on the forum that have taken their valuable time to make it easier on those that don't understand as much as they could or should.http://www.autoitscript.com/forum/index.ph...c=19434&hl=http://www.autoitscript.com/forum/index.php?showtopic=21048Take a look at these, one is a "newb so to speak" tutorial, the other is an interactive one. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Paulie Posted September 23, 2007 Share Posted September 23, 2007 Can any kind sole explain what is DIM, variable, constant and array to me? I don't understand the short explanation and examples in the Help. Or do you know a resource where I can get myself some education in these concepts? But since I'm not going to plunge too deep, I would very much appreciate if you give your everyday understanding of them. Many thanks! Dirk. Though the Helpfile and the tutorials smoke gave you should help, I'll try explaining. There are 3 main ways to define a variable.GlobalLocalDimGlobal - A variable defined as "global" can be referenced from anywhere in the script. It can be changed or re-defined at any time. Local - Variable defined as "local" only exist in functions that they are created in. If they are created outside of any function, they are treated as global. Dim - Dim basically is just a combination of Global and Local. It will declare a variable as local, unless it already exists as a global variable. Now I will give you some examples. Global - ;Globals can be referenced anywhere. Global $foo = "Green" Msgbox(0,"Outside of the function",$foo) test() Func Test() Msgbox(0,"Inside of the function",$foo) EndFuncoÝ÷ Ù²èq©m«¢+ÙÑÍÐ ¤()Õ¹QÍÐ ¤)1½°ÀÌØí½¼ôÅÕ½ÐíɸÅÕ½Ðì)5ͽà À°ÅÕ½Ðí%¹Í¥½Ñ¡Õ¹Ñ¥½¸ÅÕ½Ðì°ÀÌØí½¼¤)¹Õ¹()5ͽà À°ÅÕ½Ðí=ÕÑÍ¥½Ñ¡Õ¹Ñ¥½¸ÅÕ½Ðì°ÀÌØí½¼¤ Perhaps that will clear some things up? Link to comment Share on other sites More sharing options...
Dirk98 Posted September 23, 2007 Author Share Posted September 23, 2007 Sincere thank you, guys. I don't know if I ever dig this science, but I'll do my due diligence on it. Link to comment Share on other sites More sharing options...
GaryFrost Posted September 23, 2007 Share Posted September 23, 2007 something else to know about Dim if you have your script checked for warnings for example put the following at the top of your script: #AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6oÝ÷ Û*.Â)eëmçèZ0xºÚ"µÍÐTSÎ ÌÎNÑ[IÌÎNÈXØ]YÈXÛ][ÛYÈÙHØØ[ÜÛØ[ SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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