Article View: borland.public.jbuilder.java.language
Article #7349Re: Newbie Truncate question
From: CLG
Date: Sat, 23 Jun 2001 16:15
Date: Sat, 23 Jun 2001 16:15
29 lines
1546 bytes
1546 bytes
Since when does casting round?? -- Peace, Carl L. Gilbert lamont_gilbert @ rigidsoftware.com http://www.rigidsoftware.com ICQ 614395-currently stolen working to retrieve. "Then said I, Wisdom [is] better than strength: nevertheless the poor man's wisdom [is] despised, and his words are not heard." Ecclesiastes 9:16 "Mark Griffiths" <DONT.SPAM.mark@chive.com> wrote in message news:3b32fc72$1_1@dnews... > "dnoyeB" <lamont_gilbert @ rigidsoftware.com> wrote: > > Take the low road... > > double z = 1.02; > > int x = (int)z; > > > > not more complicated than that. > > This will round, not truncate. > > -- > Mark > >
Technical Details
Message-ID:
<3b34c1a3$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsReferences:
<3b2f52a0_1@dnews> <3b327232$1_2@dnews> <3b32fc72$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,568d12e56ba0c6bd X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-23 09:29:38 PST From: "CLG" <lamont_gilbert @ rigidsoftware.com> Newsgroups: borland.public.jbuilder.java.language References: <3b2f52a0_1@dnews> <3b327232$1_2@dnews> <3b32fc72$1_1@dnews> Subject: Re: Newbie Truncate question Date: Sat, 23 Jun 2001 12:15:36 -0400 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 24.181.226.14 Message-ID: <3b34c1a3$1_2@dnews> X-Trace: dnews 993313187 24.181.226.14 (23 Jun 2001 09:19:47 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews