Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#3261 closed Bug (Rejected)

the #include-once at the top does not seem to stop the include when it comes from a different path

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: Cc:

Description

while I was debugging a udf from progranx86 inlude directry, I was looking for a way to copy array.au3 to my source library and include it with #include "array.au3". This kinda worked but there were too many other imbedded includes for #include <array.au3> . the #include-once at the top does not seem to stop the include when it comes from a different path.

I gave up and modified array.au3 in the program directry. Is this working as designed. I was hoping the include-once would stop multiple includes regardless of the path.

Attachments (0)

Change History (4)

comment:1 by Jos, 10 years ago

Resolution: Rejected
Status: newclosed

That works as designed and don't see a bug reported in this post.
Please use the forum when you are looking for support.

Jos

comment:2 by anonymous, 10 years ago

Isn't the sole purpose of the "#include-once" keyword to stop multiple includes of the same file. This seems like a logical way to test a modification, use an #include "abc.au3" instead of #include <abc.au3> . However if you have imbedded #include <abc.au3> in other copy books, this wont work as you now get two copies loaded. It seems illogical to allow multiple includes of the same name regardless of the path they came from. They would have to have completely different content in order to use them in any way. Is there any reason to load two dissimilar files with the same name.

comment:3 by anonymous, 10 years ago

the bug is #include-once is allowing multiple includes of the same file as long as they come form different paths.

comment:4 by BrewManNH, 10 years ago

2 files from different paths are not the same file, so #include-once is working as intended. Just because they have the same name does NOT make them the same file, so the logic failure is coming from your end and not the directive.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.