Different way to split modules in multiple files
Posted: Sat Jun 22, 2013 10:03 pm
Since modules implementation is still subject to little variations, would it be much difficult to make possible to do this:
instead of this ?
I understand it's possible to make an include like this
But inside each include it would not be clear that code is part of a module... since the keyword Module appear only once in the root include.
Would be nicer if I could do something like this:
and to have something like
inside each include.
Would it be problematic to permit to do so ?
Code: Select all
DeclareModule lib1
Declare func1(par)
Declare func2(par)
EndDeclareModule
Module lib1
Procedure func1(par)
Debug "lib1 func1:" + par
EndProcedure
EndModule
Module lib1
Procedure func2(par)
Debug "lib1 func2:" + par
EndProcedure
EndModule
UseModule lib1
func1(1)
func2(2)
Code: Select all
DeclareModule lib1
Declare func1(par)
Declare func2(par)
EndDeclareModule
Module lib1
Procedure func1(par)
Debug "lib1 func1:" + par
EndProcedure
Procedure func2(par)
Debug "lib1 func2:" + par
EndProcedure
EndModule
UseModule lib1
func1(1)
func2(2)
I understand it's possible to make an include like this
Code: Select all
DeclareModule lib1
Declare func1(par)
Declare func2(par)
EndDeclareModule
Module lib1
IncludeFile "module_piece_1.pb"
IncludeFile "module_piece_2.pb"
EndModule
But inside each include it would not be clear that code is part of a module... since the keyword Module appear only once in the root include.
Would be nicer if I could do something like this:
Code: Select all
DeclareModule lib1
Declare func1(par)
Declare func2(par)
EndDeclareModule
IncludeFile "module_piece_1.pb"
IncludeFile "module_piece_2.pb"
and to have something like
Code: Select all
Module lib1
..code..
EndModule
inside each include.
Would it be problematic to permit to do so ?