Jump to content
Sign in to follow this  
RAC

Public/Private Functions

Recommended Posts

RAC

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 by RAC

Share this post


Link to post
Share on other sites
monoceres

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!

Share this post


Link to post
Share on other sites
omikron48

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.

Share this post


Link to post
Share on other sites
jvanegmond

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.

Share this post


Link to post
Share on other sites
RAC

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.