Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changes from Version 1 of VersionsToStoreMultipleProgramInOneFileExample

Show
Ignore:
Author:
jcc7 (IP: 68.97.93.38)
Timestamp:
11/14/05 03:25:59 (18 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VersionsToStoreMultipleProgramInOneFileExample

    v0 v1  
     1= Using versions to store multiple programs in one file = 
     2 
     3''Part of'' VersioningCategory 
     4 
     5== Description == 
     6 
     7Rather than having multiple programs, just have one that compiles for a variety of settings. 
     8 
     9== Example == 
     10 
     11{{{ 
     12#!d 
     13/* 
     14Version.d - the versioning example. 
     15Written by Ameer Armaly, and in the public domain. 
     16*/ 
     17//you can version for different os's like so: 
     18version(linux 
     19{ 
     20import std.c.linux.linux; 
     21} 
     22version(Win32) 
     23{ 
     24import std.c.windows.windows; 
     25} 
     26//or for different environments 
     27 
     28version(fast) 
     29{ 
     30//whatever makes it runf aster 
     31} 
     32version(small) 
     33{ 
     34//whatever makes it smaller 
     35} 
     36}}} 
     37 
     38== Source == 
     39 
     40Originally contributed by "Anonymous" on Sun Jul 25, 2004. 
     41 
     42|| Link || http://www.dsource.org/tutorials/index.php?show_example=106 || 
     43|| Edited by || jcc7 || 
     44|| Date/Time || Thu Sep 23, 2004 9:31 pm ||