Module symbol name clash

BlitzMax Forums/BlitzMax Programming/Module symbol name clash

jpavel(Posted 2009) [#1]
Hello,

I'm working to further my understanding of BlitzMax's module system:

If two modules declare types or globals with the same name (for instance if a hypothetical "games.fontutils" module also declared a TFont type), can these types still be used, maybe with a Java package-like syntax (BRL.Font.TFont, games.fontutils.TFont), or would such a situation result in a compile/link error?

Thanks,
Jesse


Gabriel(Posted 2009) [#2]
Yes, that's exactly how it works. The module groupname and modulename are combined to form a namespace. If you just used TFont alone, it would result in a compile error, but with the namespace in front, it will compile and link just fine.


jpavel(Posted 2009) [#3]
Thanks for the quick reply!

BlitzMax seems to have a nice blend of C's and Java's language features, and it feels right at home.