Mercurial > projects > dstress
changeset 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 | 385c191b178b |
children | 50a9bd194e33 |
files | run/const_20_A.d run/const_20_B.d run/const_20_C.d run/const_20_D.d run/const_21_A.d run/const_21_B.d run/const_21_C.d run/const_21_D.d run/const_22_A.d run/const_22_B.d run/const_22_C.d run/const_22_D.d |
diffstat | 12 files changed, 204 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_20_A.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_20_A.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_20_A; + +int main(){ + const float d = -3.0f; + int i = cast(int)d; + assert(-3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_20_B.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_20_B.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_20_B; + +int main(){ + float d = -3.0f; + int i = cast(int)d; + assert(-3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_20_C.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_20_C.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_20_C; + +int main(){ + const float d = 3.0f; + int i = cast(int)d; + assert(3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_20_D.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_20_D.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_20_D; + +int main(){ + float d = 3.0f; + int i = cast(int)d; + assert(3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_21_A.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_21_A.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_21_A; + +int main(){ + const double d = -3.0; + int i = cast(int)d; + assert(-3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_21_B.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_21_B.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_21_B; + +int main(){ + double d = -3.0; + int i = cast(int)d; + assert(-3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_21_C.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_21_C.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_21_C; + +int main(){ + const double d = 3.0; + int i = cast(int)d; + assert(3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_21_D.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_21_D.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_21_D; + +int main(){ + double d = 3.0; + int i = cast(int)d; + assert(3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_22_A.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_22_A.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_22_A; + +int main(){ + const real d = -3.0L; + int i = cast(int)d; + assert(-3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_22_B.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_22_B.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_22_B; + +int main(){ + real d = -3.0L; + int i = cast(int)d; + assert(-3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_22_C.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_22_C.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_22_C; + +int main(){ + const real d = 3.0L; + int i = cast(int)d; + assert(3 == i); + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/const_22_D.d Tue May 10 23:48:58 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL: http://dstress.kuehne.cn/run/const_22_D.d $ +// $Date: 2005-05-06 11:25:58 +0200 (Fr, 06 Mai 2005) $ +// $Author: thomask $ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-05-05 +// @uri@ news:d5cj56$mfp$1@digitaldaemon.com + +module dstress.run.const_22_D; + +int main(){ + real d = 3.0L; + int i = cast(int)d; + assert(3 == i); + return 0; +} +