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

Changes between Version 1 and Version 2 of InterfaceTemplateExample

Show
Ignore:
Author:
jcc7 (IP: 192.149.244.9)
Timestamp:
11/06/06 22:29:02 (15 years ago)
Comment:

fixed newsgroup link

Legend:

Unmodified
Added
Removed
Modified
  • InterfaceTemplateExample

    v1 v2  
    22 
    33''Part of'' TemplatesCategory 
     4 
    45 
    56== Description == 
    78Shows how to use an interface template 
    89 
     10 
    911== Example == 
    1012 
    11 It wasn't mentioned in the docs, but I had a slight inkling that it might be the case that one could have !InterfaceTemplates using the same syntax as !ClassTemplates (ie class ClassName(T) : [superclass [, interfaces] ). The following example compiled and ran correctly, outputting "1\n4\n" as expected. Perhaps this warrants a mention in the documentation under Templates, alongside "Class Templates"? 
     13It wasn't mentioned in the docs, but I had a slight inkling that it might be the case that one could have !InterfaceTemplates using the same syntax as !ClassTemplates (ie class ClassName(T) : ![superclass [, interfaces] ). The following example compiled and ran correctly, outputting "1\n4\n" as expected. Perhaps this warrants a mention in the documentation under Templates, alongside "Class Templates"? 
    1214 
    1315{{{ 
    4143}}} 
    4244 
     45 
    4346== Source == 
    4447 
    45 [http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/3828 digitalmars.D:3828] 
    46  
    47 || Link || http://www.dsource.org/tutorials/index.php?show_example=99 || 
    48 || Posted by || jcc7 || 
    49 || Date/Time || Mon Jun 21, 2004 9:20 pm || 
     48From [http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=3828 digitalmars.D:3828].