Name.Spaces.How?

BlitzMax Forums/BlitzMax Programming/Name.Spaces.How?

BLaBZ(Posted 2010) [#1]
I'd like to create name spaces to organize some methods and functions.

Any idea how I would go about doing that?


Gabriel(Posted 2010) [#2]
Put them in a module. Modules are the only namespaces that BlitzMax understands.


BLaBZ(Posted 2010) [#3]
Isn't there a way to fake it?

Like putting some sort of array within a type?

I thought I saw something like that somewhere...


N(Posted 2010) [#4]
You can put globals and constants in types, but I don't think I'd recommend it.


Czar Flavius(Posted 2010) [#5]
I put them in types all the time, but they won't show up in the debugger :(. They are usually only used for type specific things. For example, a global TList for all my my TApples will be stored in its type.


BLaBZ(Posted 2010) [#6]
lol it was a nice thought, I guess I can fake it...

space1_space2_bingo!


_Skully(Posted 2010) [#7]
You can put globals and constants in types, but I don't think I'd recommend it.

I do this all the time... never had a problem.


H&K(Posted 2010) [#8]
You can put globals and constants in types, but I don't think I'd recommend it.


If the global or constant belongs to the types you SHOULD put it in the type.


beanage(Posted 2010) [#9]
I heard BlitzMax has trouble with nesting functions and types into functions, although it is possible (iirc Leadwerks said that). Has this been/is this true?