annotate run/const_21_D.d @ 510:ef1faa3f2bf7
const float conversions
zwang <nehzgnaw@gmail.com>
2005-05-05
news:d5cj56$mfp$1@digitaldaemon.com
author |
thomask |
date |
Tue, 10 May 2005 23:48:58 +0000 |
parents |
|
children |
9a121126b077 |
rev |
line source |
510
|
1 // $HeadURL: http://dstress.kuehne.cn/run/const_21_D.d $
|
|
2 // $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $
|
|
3 // $Author: thomask $
|
|
4
|
|
5 // @author@ zwang <nehzgnaw@gmail.com>
|
|
6 // @date@ 2005-05-05
|
|
7 // @uri@ news:d5cj56$mfp$1@digitaldaemon.com
|
|
8
|
|
9 module dstress.run.const_21_D;
|
|
10
|
|
11 int main(){
|
|
12 double d = 3.0;
|
|
13 int i = cast(int)d;
|
|
14 assert(3 == i);
|
|
15 return 0;
|
|
16 }
|
|
17
|