sub module

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
microdevweb
Enthusiast
Enthusiast
Posts: 179
Joined: Fri Jun 13, 2014 9:38 am
Location: Belgique

sub module

Post by microdevweb »

That will very great if we can create a module into an another module
Use Pb 5.73 lst and Windows 10

my mother-language isn't english, in advance excuse my mistakes.
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: sub module

Post by Saki »

This is very true +1
地球上の平和
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: sub module

Post by StarBootics »

-1 I disagree with that. What we really need is Namespace/EndNamespace and in that Namespace you can add as many modules as you want.

I could look like that :

Code: Select all

Namespace Maths

  DeclareModule Vector2
    ...
  EndDeclareModule
  
  Module Vector2
    ...
  EndModule
  
  DeclareModule Vector3
     ...
  EndDeclareModule
  
  Module Vector3
     ...
  EndModule
  
EndNamespace
And to access it in the code later on :

Code: Select all

Maths::Vector2::SomeProcedure()
Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Post Reply