Zephir Posted January 11, 2007 Posted January 11, 2007 Hey, im not sure if it is a bug or not. But if u make a Script that reads an ini file to variables it works fine: Example: $var = IniRead("blah", "blub", " bli", 0) However, as soon as you wrap the order in a function it wont work saying that the variable $var is used wihtouh being declared Example: Func _loadExternalData() $var = IniRead("blah", "blub", " bli", 0) EndFunc I does work if u declare the variable $var first (Dim $var for example). I just dont understand why it doesnt work as soon as u plac the iniread segment into a function. Sorry if it is not a bug or has been reported before. Greetz, Zephir
Developers Jos Posted January 11, 2007 Developers Posted January 11, 2007 (edited) When you are not sure its a Bug then please post it in the support forum first. (I will move it) When you use a variable in a Func without a Global scope decleration , the variable will have a local scope, which means it will only "exist" inside the Func..EndFunc. Edited January 11, 2007 by JdeB 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.
Zephir Posted January 11, 2007 Author Posted January 11, 2007 When you are not sure its a Bug then please post it in the support forum first. (I will move it)When you use a variable in a Func without a Global scope decleration , the variable will have a local scope, which means it will only "exist" inside the Func..EndFunc.sorry for posting in wrong placeand thanks for explanation
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