Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #6033

Re: Division

From Malcolm G <malcolm-news2012delete@delete.jobstream.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Division
References <5fe94c71-071f-4775-a89c-ac3a00a5b45e@googlegroups.com>
Message-ID <w8S4u.1$J72.0@fx08.am4> (permalink)
Organization virginmedia.com
Date 2013-10-08 12:38 +0100

Show all headers | View raw


On 08/10/2013 12:06, Rob Smith wrote:
> Hi
> 
> I want to divide an integer by another integer and get a result including the full result

The short answer is don't.
That is convert the numbers to float before doing the division.

> local nYears as float
> local nDays as int
> 
> nYears:=nDays/365 gives me a result of 0 where nDays is 132, how do I divide and get the decimal portion?
> 
> Thanks
> 
> Robert
> 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Division Rob Smith <rasmithhalifax@gmail.com> - 2013-10-08 04:06 -0700
  Re: Division "Wolfgang Riedmann" <wriedmann@gmail.com> - 2013-10-08 13:27 +0200
  Re: Division Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2013-10-08 12:38 +0100

csiph-web