Allow using module names with 'With' directive
Posted: Thu Sep 24, 2015 7:26 am
It would be great to be able to make use of With/EndWith wirth module names.
example :
The result would be, of course, the same we now have with the UseModule/UnuseModule construct.
But it would offer the advantage of a lighter, clearer style when coding just a few lines.
For longer coding sections, the UseModule/UnuseModule pair would remain available, and most likely preferable.
example :
Code: Select all
DeclareModule Ferrari
#moduleName = "Ferrari"
Define units
EndDeclareModule
Module Ferrari
units = FactoryOutput(12)
EndModule
..
..
With Ferrari
Debug #moduleName
Debug units
EndWith
..
..
But it would offer the advantage of a lighter, clearer style when coding just a few lines.
For longer coding sections, the UseModule/UnuseModule pair would remain available, and most likely preferable.