BionicBulldog Posted July 18, 2005 Share Posted July 18, 2005 Why doesn't the value $iTemp show the values '1' to '3' when run? I've declared the variable as global, but it acts like it's only a local. ;--- Begin Script --- Global $iTemp One() Func One() For $iTemp = 1 to 3 Two() Next EndFunc Func Two() MsgBox(0, "", $iTemp) EndFunc ;--- End Script --- Thanks, BionicBulldog Link to comment Share on other sites More sharing options...
Developers Jos Posted July 18, 2005 Developers Share Posted July 18, 2005 Why doesn't the value $iTemp show the values '1' to '3' when run? I've declared the variable as global, but it acts like it's only a local.;--- Begin Script ---Global $iTempOne()Func One() For $iTemp = 1 to 3 Two() NextEndFuncFunc Two() MsgBox(0, "", $iTemp)EndFunc;--- End Script ---Thanks,BionicBulldog<{POST_SNAPBACK}>The variable used in a For...Next loop is dynamically declared with a Local scope....(Maybe we need to say something about it in the Helpfile If functions page ??) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
BionicBulldog Posted July 18, 2005 Author Share Posted July 18, 2005 The variable used in a For...Next loop is dynamically declared with a Local scope....(Maybe we need to say something about it in the Helpfile If functions page ??)<{POST_SNAPBACK}>Thanks for the info.Glad to know I'm not crazy, well maybe I am, but not about this one issue... 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