Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 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 Changed 8 years ago by Jos

  • Resolution set to Rejected
  • Status changed from new to closed

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 Changed 8 years ago by anonymous

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 Changed 8 years ago by anonymous

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

comment:4 Changed 8 years ago by BrewManNH

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.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.