More than one main

Walter Bright newshound2 at digitalmars.com
Thu Mar 24 11:46:01 PDT 2011


On 3/24/2011 11:47 AM, bearophile wrote:
> I too have suggested to use the version() statement, but My_Demo is not a
> _standard_ version generated automatically by tools like rdmd. In a project
> you usually use many modules, and some of them have demo code in their main.
> If you use rdmd or similar tools, you want only one of those mains to be
> compiled, the right one.

rdmd takes command line switches, which you can use to set the version for which 
main you want.


More information about the Digitalmars-d mailing list