Namespaces

Previous  Next

 

MyBASIC2 is not an object oriented language so it doesn't have classes.  However, to make it easier, faster and more structural it has implemented something called Namespace.  A MyBASIC2 is a variable that has a collection of functions associated with it.  MyBASIC2 Extension Libraries uses Namespaces to make it easy to add and remove functions and to make function names unique and idenfifyable.

 

You can use WITH..ENDWITH to make a Namespace the active Namespace and then access it functions without having to specify the Namespace.  This also makes it possible to have several Namespaces with same function names and then select the Namespace in run-time using a STRING variable.