flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Include File Problem |
Author |
|
Tomasz Grysztar 03 Mar 2004, 20:27
Well, this is the "bad" feature that is kept mainly for backward compatibility. Some solutions were discussed here: http://board.flatassembler.net/topic.php?t=583
Anyway your suggestion may be a good idea - I think it would keep the enough backward compatibility while providing simple solution to this problem. |
|||
03 Mar 2004, 20:27 |
|
Randall Hyde 03 Mar 2004, 21:41
Privalov wrote: Well, this is the "bad" feature that is kept mainly for backward compatibility. Some solutions were discussed here: http://board.flatassembler.net/topic.php?t=583 Yeah, about the only problem I can imagine is if you've got two header files with the same name, one in the same directory at "t.asm" and one in the current directory. Of course, anyone writing such code pretty must deserves the ambiguity that arises! Still, I must say that when I added this feature to HLA, I was careful to look at what other assemblers (in particular, MASM & TASM) did, and what they did seemed quite reasonable so I went with that (which I described in my original post). As for the thread you mentioned, I gave it a quick once-over. I think the rules I laid out would work fine for what the OP wanted. That is, first look in the directory containing the file with the "include" directive, then look in the "current" directory. It's easy to imagine a situation where you have one file including another from a different directory, which includes another file from a different directory, etc., etc., and you wind up with a chain of possible locations. But if such a source code organization fouls up an assembly, that should be a pretty good clue to the user that they need to reorganize their directory structure for the project. You could go crazy with all the possibilities, but I think that the 'four step' algorithm I gave earlier will handle 99.9% of the cases. Cheers, Randy Hyde |
|||
03 Mar 2004, 21:41 |
|
vid 04 Mar 2004, 19:15
nice idea
ambiguity problem can be solved by always looking at all directories and if there are more files with that name just report error. |
|||
04 Mar 2004, 19:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.