flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Compiler Internals > include once

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 14463
Location: Eta Argus

l_inc wrote:
revolution

Quote:
Because Linux, Unix and Windows would break the code in different ways due to case and path differences.


Provide an example. Without it it seems you are just ignoring what I say.


Code:
include 'c:\code\uberstuff.inc' ;<--- Linux can open this?

Post 15 Dec 2015, 14:19
View user's profile Send private message Visit poster's website Reply with quote
idle



Joined: 06 Jan 2011
Posts: 334
Location: ukraina
Post 15 Dec 2015, 14:24
View user's profile Send private message Send e-mail Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 867
revolution
I didn't say, one should use full paths, but your suggestion is to introduce many more limitations. Say there's a library that includes its files using relative paths (similar to win32a.inc). Some files can be included as a part of the library or individually. The relative paths would be different. How restrictive should be your rules to avoid this?

That's not mentioning that soft and hard links are possible in both Windows and Linux. Taking that into account shows that C-style inclusion duplication prevention is the only correct way. Just consider what you'd do to compile a project making use of soft links on a system that has no support for them.

_________________
Faith is a superposition of knowledge and fallacy
Post 15 Dec 2015, 14:30
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 14463
Location: Eta Argus

l_inc wrote:
That's not mentioning that soft and hard links are possible in both Windows and Linux. Taking that into account shows that C-style inclusion duplication prevention is the only correct way. Just consider what you'd do to compile a project making use of soft links on a system that has no support for them.

I agree. I never said this was a proper or complete solution. It is not. But if one wants to make to most of it then such self restrictions can help to make it less error prone to use.
Post 15 Dec 2015, 16:41
View user's profile Send private message Visit poster's website Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 867
revolution
I have nothing against some rules of project organization. I'm just saying that the only reason to implement "include once" natively is the ability to unambiguously identify files, and if even this advantage is ignored, then it's just useless.

_________________
Faith is a superposition of knowledge and fallacy
Post 15 Dec 2015, 19:16
View user's profile Send private message Reply with quote
idle



Joined: 06 Jan 2011
Posts: 334
Location: ukraina
Again, once is a user-typed hint to overcome standard behaviour of fasm.
It does nothing to fasm structures, keeping inclusion order as described in official manual.
What it really does: when fasm is just about including a file, once checks for its presence and does its job.
Post 16 Dec 2015, 06:25
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >

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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.