RAC Posted September 7, 2009 Posted September 7, 2009 (edited) Hi folks, I'm writing an "include" file which has a main procedure accessible to any file that does the #include. But within my "include" file I also have several internal-only utility procedures, which I do NOT want to be accessible by the outside world. In other languages, I would declare my main procedure to be Public, and my internal-only procedures to be Private. Is there any way within AutoIt of doing this please? (Yes I could split my "include" file into 2, with one being the Public part and t'other being the Private part. But I'd rather keep it all in one file for safety <g>.) Ta muchly, RAC Edited September 7, 2009 by RAC
monoceres Posted September 7, 2009 Posted September 7, 2009 Nope, include files are just copied & pasted into the file that included it so everything is accessible everywhere. Broken link? PM me and I'll send you the file!
omikron48 Posted September 8, 2009 Posted September 8, 2009 You can always just use garble words for your utility functions to discourage other people for bothering to figure them out and use them. That's the limit of a procedural language - you can't make objects; you can't restrict function access; you can't overload functions.
jvanegmond Posted September 8, 2009 Posted September 8, 2009 Nope, include files are just copied & pasted into the file that included it so everything is accessible everywhere.That's right, @op there is no file scope like in Lua either. github.com/jvanegmond
RAC Posted September 9, 2009 Author Posted September 9, 2009 To everybody, Thank you for the quick replies. Ah well, I suspected as much, but I thought I'd better ask. Thanks to all, RAC
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