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 RuntimeTypeInformationExample

Show
Ignore:
Author:
nascent (IP: 67.110.217.136)
Timestamp:
05/30/10 22:04:26 (11 years ago)
Comment:

Updated to be version agnostic.

Legend:

Unmodified
Added
Removed
Modified
  • RuntimeTypeInformationExample

    v1 v2  
    1111{{{ 
    1212#!d 
    13 import std.c.stdio; 
     13import std.stdio; 
    1414 
    1515class A {} 
    2020    Object o; 
    2121    o = new Object; 
    22     bit b; 
     22    bool b; 
    2323     
    24     printf("%.*s\n", a.classinfo.name); 
    25     printf("%.*s\n", o.classinfo.name); 
     24    writef("%s\n", a.classinfo.name); 
     25    writef("%s\n", o.classinfo.name); 
    2626 
    2727    /* These aren't allowed... */ 
    2828 
    29 //    printf("%.*s\n", b.classinfo.name); 
    30 //    printf("%.*s\n", b.typeinfo.name); 
     29//    writef("%s\n", b.classinfo.name); 
     30//    writef("%s\n", b.typeinfo.name); 
    3131 
    3232    return 1;