how that's seen in my mind:
having met include, fasm fetches full path of the file
then fasm inspects list of files it has included
if no such file included, fasm includes it regardless once presence
if a file had been included and once present, fasm does nothing

Also, I didn't try it, but can the first instance of a file also use the "once" syntax? That is: do users need to worry about which include statement is the first, or can they just make everything "include once"?

Also the path and case must be specified exactly the same else it won't match.

Well, then the patch is no-go. It's quite controversial by itself, whether it is a responsibility of the includer or the includee to ensure unique inclusion, or how "include once" should behave in relation to the normal include. And if it doesn't even make use of smth. like GetFileInformationByHandle, it's no better than the existing macros doing the same. In the current implementation it's actually worse.

I don't see why it is worse. But anyhow, knowing the limitations should be enough. Users can then decide if it is fit for their purpose(s). Having some sort of coding standard documentation for specifying file paths could help to avoid problems in one's code.

There's at least one technical reason (you mentioned) for that: the limit of 254 files. And the conceptual reason is that macros give more flexibility. E.g., if you have a (say "legacy") project using only include, then you can use my includecheck (it can be improved using irpv) to avoid include duplication without having to refactor the project.

Quote:

Having some sort of coding standard documentation for specifying file paths could help to avoid problems in one's code.

And why should one introduce such a limitation for a native solution, if it is (contrary to macros) possible to avoid it?

And why should one introduce such a limitation for a native solution, if it is (contrary to macros) possible to avoid it?

Because Linux, Unix and Windows would break the code in different ways due to case and path differences. So keeping a standard naming scheme is already a desirable asset regardless of the availability of includeonce.

include OnCe 'abc.inc'
include oNcE 'ABC.INC';<---onWindowsthisisthesamefile.;andonceknowsthat;toseehowfullpathsareoperatedon,open1.71.39preproce.incanduncommentasfollows;subesp,8;pushedx;invokeMessageBox,0,edi,esi,0;popedx;addesp,8;recompilefasmandrunyoursourcesagain
include once '.\abc.inc';<---thesamefileagainbutnotmatched.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum